]> git.sur5r.net Git - openldap/commitdiff
ITS#8354 fix syncprov abandon
authorHoward Chu <hyc@openldap.org>
Fri, 22 Jan 2016 20:41:48 +0000 (20:41 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 22 Jan 2016 20:41:48 +0000 (20:41 +0000)
Check for abandon just before recording psearch

servers/slapd/overlays/syncprov.c

index 69be484165452ff6d7e4b4491188250ab1ef277c..9affd0ee67ef2d3e2f6461acb3f5d015753a8e27 100644 (file)
@@ -2553,6 +2553,11 @@ syncprov_op_search( Operation *op, SlapReply *rs )
                sop->s_inuse = 2;
 
                ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
+               if ( op->o_abandon ) {
+                       ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
+                       ch_free( sop );
+                       return SLAPD_ABANDON;
+               }
                while ( si->si_active ) {
                        /* Wait for active mods to finish before proceeding, as they
                         * may already have inspected the si_ops list looking for