]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/result.c
Use a separate mutex for the replication timestamp
[openldap] / servers / slapd / result.c
index 2374d94b564ec5532c12b99259a32d8cb9a1d953..b3971d5284a3e8f5c136a657ca8aa217aa0bb235 100644 (file)
@@ -248,7 +248,7 @@ send_ldap_controls( Operation *o, BerElement *ber, LDAPControl **c )
         * plugin.
         */
 
-       if ( slapi_pblock_get( o->o_pb, SLAPI_RESCONTROLS, &sctrls ) != 0 ) {
+       if ( o->o_pb && slapi_pblock_get( o->o_pb, SLAPI_RESCONTROLS, &sctrls ) != 0 ) {
                sctrls = NULL;
        }
 
@@ -289,11 +289,12 @@ send_ldap_response(
 {
        BerElementBuffer berbuf;
        BerElement      *ber = (BerElement *) &berbuf;
-       int             rc;
+       int             rc = LDAP_SUCCESS;
        long    bytes;
 
        if (op->o_callback) {
                slap_callback *sc = op->o_callback;
+               rc = SLAP_CB_CONTINUE;
                for ( ; op->o_callback; ) {
                        if ( op->o_callback->sc_response ) {
                                rc = op->o_callback->sc_response( op, rs );
@@ -304,7 +305,7 @@ send_ldap_response(
                op->o_callback = sc;
                if ( rc != SLAP_CB_CONTINUE ) goto cleanup;
        }
-               
+
 #ifdef LDAP_CONNECTIONLESS
        if (op->o_conn && op->o_conn->c_is_udp)
                ber = op->o_res_ber;
@@ -719,6 +720,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
        rs->sr_type = REP_SEARCH;
        if (op->o_callback) {
                slap_callback *sc = op->o_callback;
+               rc = SLAP_CB_CONTINUE;
                for ( ; op->o_callback; ) {
                        if ( op->o_callback->sc_response ) {
                                rc = op->o_callback->sc_response( op, rs );
@@ -1327,6 +1329,7 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
        rs->sr_type = REP_SEARCHREF;
        if (op->o_callback) {
                slap_callback *sc = op->o_callback;
+               rc = SLAP_CB_CONTINUE;
                for ( ; op->o_callback; ) {
                        if ( op->o_callback->sc_response ) {
                                rc = op->o_callback->sc_response( op, rs );