From: Pierangelo Masarati Date: Tue, 10 Feb 2009 14:27:28 +0000 (+0000) Subject: more on ITS#5931: handle intermediate responses and support syncrepl also in back... X-Git-Tag: ACLCHECK_0~842 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a5924e309271f175585c94a24d21ff351da56dc9;p=openldap more on ITS#5931: handle intermediate responses and support syncrepl also in back-ldap --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index f797474a52..861418c8e4 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -424,10 +424,34 @@ retry: } } else if ( rc == LDAP_RES_INTERMEDIATE ) { - Debug( LDAP_DEBUG_ANY, - "%s ldap_back_search: " - "intermediate response not supported yet.\n", - op->o_log_prefix, 0, 0 ); + /* FIXME: response controls + * are passed without checks */ + rc = ldap_parse_intermediate( lc->lc_ld, + res, + &rs->sr_rspoid, + &rs->sr_rspdata, + &rs->sr_ctrls, + 0 ); + if ( rc != LDAP_SUCCESS ) { + continue; + } + + slap_send_ldap_intermediate( op, rs ); + + if ( rs->sr_rspoid != NULL ) { + ber_memfree( rs->sr_rspoid ); + rs->sr_rspoid = NULL; + } + + if ( rs->sr_rspdata != NULL ) { + ber_bvfree( rs->sr_rspdata ); + rs->sr_rspdata = NULL; + } + + if ( rs->sr_ctrls != NULL ) { + ldap_controls_free( rs->sr_ctrls ); + rs->sr_ctrls = NULL; + } } else { char *err = NULL;