]> git.sur5r.net Git - openldap/commitdiff
ITS#7142 fix slapadd exit on failure
authorHoward Chu <hyc@openldap.org>
Sat, 28 Jan 2012 23:44:51 +0000 (15:44 -0800)
committerHoward Chu <hyc@openldap.org>
Sat, 28 Jan 2012 23:44:51 +0000 (15:44 -0800)
servers/slapd/slapadd.c

index 1ce3b1fc2fde7dbafe78aa35a7c359e3d85db35d..ec0eb011d23f88f040d640be15eea684debdf6ff 100644 (file)
@@ -448,9 +448,11 @@ slapadd( int argc, char **argv )
        }
 
        if ( slap_tool_thread_max > 1 ) {
+               ldap_pvt_thread_mutex_lock( &add_mutex );
                add_stop = 1;
                trec.ready = 0;
                ldap_pvt_thread_cond_signal( &add_cond );
+               ldap_pvt_thread_mutex_unlock( &add_mutex );
                ldap_pvt_thread_join( thr, NULL );
        }