long bytes;
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_response ) {
rc = op->o_callback->sc_response( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
if ( rc != SLAP_CB_CONTINUE ) break;
}
+ first = 0;
}
op->o_callback = sc;
clean2:;
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
}
+ first = 0;
}
op->o_callback = sc;
rs->sr_type = REP_SEARCH;
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_response ) {
rc = op->o_callback->sc_response( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
if ( rc != SLAP_CB_CONTINUE ) break;
}
+ first = 0;
}
op->o_callback = sc;
}
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
}
+ first = 0;
}
op->o_callback = sc;
rs->sr_type = REP_SEARCHREF;
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_response ) {
rc = op->o_callback->sc_response( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
if ( rc != SLAP_CB_CONTINUE ) break;
}
+ first = 0;
}
op->o_callback = sc;
rel:
if ( op->o_callback ) {
+ int first;
slap_callback *sc = op->o_callback,
*sc_next = op->o_callback;
sc_next = op->o_callback->sc_next;
if ( op->o_callback->sc_cleanup ) {
(void)op->o_callback->sc_cleanup( op, rs );
+ if ( first && op->o_callback == NULL ) {
+ sc = NULL;
+ }
}
+ first = 0;
}
op->o_callback = sc;
*matched = NULL;
*info = NULL;
- if ( strncasecmp( s, "RESULT", 6 ) != 0 ) {
+ if ( strncasecmp( s, "RESULT", STRLENOF( "RESULT" ) ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, INFO,
"str2result: (%s), expecting \"RESULT\"\n", s, 0, 0 );
c++;
}
- if ( strncasecmp( s, "code", 4 ) == 0 ) {
+ if ( strncasecmp( s, "code", STRLENOF( "code" ) ) == 0 ) {
if ( c != NULL ) {
*code = atoi( c );
}
- } else if ( strncasecmp( s, "matched", 7 ) == 0 ) {
+ } else if ( strncasecmp( s, "matched", STRLENOF( "matched" ) ) == 0 ) {
if ( c != NULL ) {
*matched = c;
}
- } else if ( strncasecmp( s, "info", 4 ) == 0 ) {
+ } else if ( strncasecmp( s, "info", STRLENOF( "info" ) ) == 0 ) {
if ( c != NULL ) {
*info = c;
}