]> git.sur5r.net Git - openldap/commitdiff
ITS#8063 more for prev commit
authorHoward Chu <hyc@openldap.org>
Wed, 25 Feb 2015 06:11:44 +0000 (06:11 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 25 Feb 2015 06:11:44 +0000 (06:11 +0000)
servers/slapd/overlays/syncprov.c

index 47a5ae9141d41ca9e7a4d19565b2bed7c4bfc01a..396594eda97483def9b5e12c01709839e8decc7f 100644 (file)
@@ -2120,8 +2120,16 @@ syncprov_op_mod( Operation *op, SlapReply *rs )
                        mt->mt_tail = mi;
                        /* wait for this op to get to head of list */
                        while ( mt->mt_mods != mi ) {
+                               modinst *m2;
+                               int same = 0;
                                /* don't wait on other mods from the same thread */
-                               if ( mt->mt_mods->mi_op->o_threadctx == op->o_threadctx )
+                               for ( m2 = mt->mt_mods; m2; m2 = m2->mi_next ) {
+                                       if ( m2->mi_op->o_threadctx == op->o_threadctx ) {
+                                               same = 1;
+                                               break;
+                                       }
+                               }
+                               if ( same )
                                        break;
 
                                ldap_pvt_thread_mutex_unlock( &mt->mt_mutex );