]> git.sur5r.net Git - openldap/commitdiff
Fix test050
authorHoward Chu <hyc@openldap.org>
Tue, 20 Nov 2007 14:56:20 +0000 (14:56 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 20 Nov 2007 14:56:20 +0000 (14:56 +0000)
servers/slapd/bconfig.c
servers/slapd/connection.c
servers/slapd/syncrepl.c

index 4564a6f5032387eaf2539ff80204e164b30d1d25..7aa86fbbadf88c811139f49d0c3cd182861cef28 100644 (file)
@@ -4909,6 +4909,7 @@ config_back_modify( Operation *op, SlapReply *rs )
        struct berval rdn;
        char *ptr;
        AttributeDescription *rad = NULL;
+       int do_pause = 1;
 
        cfb = (CfBackInfo *)op->o_bd->be_private;
 
@@ -4939,11 +4940,17 @@ config_back_modify( Operation *op, SlapReply *rs )
                        rs->sr_text = "Use modrdn to change the entry name";
                        goto out;
                }
+               /* Internal update of contextCSN? */
+               if ( ml->sml_desc == slap_schema.si_ad_contextCSN && op->o_conn->c_conn_idx == -1 ) {
+                       do_pause = 0;
+                       break;
+               }
        }
 
        slap_mods_opattrs( op, &op->orm_modlist, 1 );
 
-       ldap_pvt_thread_pool_pause( &connection_pool );
+       if ( do_pause )
+               ldap_pvt_thread_pool_pause( &connection_pool );
 
        /* Strategy:
         * 1) perform the Modify on the cached Entry.
@@ -4975,7 +4982,8 @@ config_back_modify( Operation *op, SlapReply *rs )
                op->o_ndn = ndn;
        }
 
-       ldap_pvt_thread_pool_resume( &connection_pool );
+       if ( do_pause )
+               ldap_pvt_thread_pool_resume( &connection_pool );
 out:
        send_ldap_result( op, rs );
        slap_graduate_commit_csn( op );
index c2e5a74318186f7f14de9048f4415d7129e69b6f..1b8f87381f619cd84f7a631329b046cf67344f88 100644 (file)
@@ -1257,6 +1257,7 @@ void connection_client_stop(
        c->c_listener = NULL;
        c->c_conn_state = SLAP_C_INVALID;
        c->c_struct_state = SLAP_C_UNUSED;
+       c->c_sd = AC_SOCKET_INVALID;
        c->c_close_reason = "?";                        /* should never be needed */
        sb = c->c_sb;
        c->c_sb = ber_sockbuf_alloc( );
index 085e59f12d6d891ffa534f75a2891b2ff4ce3006..951fb3409926d2da1824fe369cb67bc7ff0117e5 100644 (file)
@@ -522,6 +522,7 @@ do_syncrep1(
                                if ( ber_bvarray_dup_x( &si->si_syncCookie.ctxcsn,
                                        si->si_cookieState->cs_vals, NULL )) {
                                        rc = LDAP_NO_MEMORY;
+                                       ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex );
                                        goto done;
                                }
                                si->si_syncCookie.numcsns = si->si_cookieState->cs_num;