]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/modify.c
Code clean-up.
[openldap] / servers / slapd / back-ldbm / modify.c
index 7caeacb9df32092b0fb96251c39bc1b2fd07daeb..940d2c808bf68b20c7f8fd0ca627de43349a1a18 100644 (file)
@@ -32,6 +32,7 @@ ldbm_back_modify(
 
        Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
 
+       /* acquire and lock entry */
        if ( (e = dn2entry_w( be, dn, &matched )) == NULL ) {
                send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched,
                    NULL );
@@ -41,10 +42,6 @@ ldbm_back_modify(
                return( -1 );
        }
 
-       /* check for deleted */
-
-       /* lock entry */
-
        if ( (err = acl_check_modlist( be, conn, op, e, modlist )) != LDAP_SUCCESS ) {
                send_ldap_result( conn, op, err, NULL, NULL );
                goto error_return;
@@ -82,12 +79,12 @@ ldbm_back_modify(
        }
 
        /* check for abandon */
-       pthread_mutex_lock( &op->o_abandonmutex );
+       ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
        if ( op->o_abandon ) {
-               pthread_mutex_unlock( &op->o_abandonmutex );
+               ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
                goto error_return;
        }
-       pthread_mutex_unlock( &op->o_abandonmutex );
+       ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
 
        /* modify indexes */
        if ( index_add_mods( be, modlist, e->e_id ) != 0 ) {
@@ -96,12 +93,12 @@ ldbm_back_modify(
        }
 
        /* check for abandon */
-       pthread_mutex_lock( &op->o_abandonmutex );
+       ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
        if ( op->o_abandon ) {
-               pthread_mutex_unlock( &op->o_abandonmutex );
+               ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
                goto error_return;
        }
-       pthread_mutex_unlock( &op->o_abandonmutex );
+       ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
 
        /* change the entry itself */
        if ( id2entry_add( be, e ) != 0 ) {