- "send_search_result: err=%d matched=\"%s\" text=\"%s\"\n",
- err, matched ? matched : "", text ? text : "" );
-#endif
-
-
- assert( err != LDAP_PARTIAL_RESULTS );
-
- if( op->o_protocol < LDAP_VERSION3 ) {
- /* send references in search results */
- if( err == LDAP_REFERRAL ) {
- err = LDAP_PARTIAL_RESULTS;
- }
-
- tmp = v2ref( refs, text );
- text = tmp;
- refs = NULL;
-
- } else {
- /* don't send references in search results */
- assert( refs == NULL );
- refs = NULL;
-
- if( err == LDAP_REFERRAL ) {
- err = LDAP_SUCCESS;
- }
- }
-
- tag = req2res( op->o_tag );
- msgid = (tag != LBER_SEQUENCE) ? op->o_msgid : 0;
-
- send_ldap_response( conn, op, tag, msgid,
- err, matched, text, refs,
- NULL, NULL, NULL, ctrls );
-
- {
- char nbuf[64];
- snprintf( nbuf, sizeof nbuf, "%d nentries=%d", err, nentries );
-
- Statslog( LDAP_DEBUG_STATS,
- "conn=%lu op=%lu SEARCH RESULT tag=%lu err=%s text=%s\n",
- op->o_connid, op->o_opid, tag, nbuf, text ? text : "" );
- }
-
- if (tmp != NULL) {
- ch_free(tmp);
- }
+ "send_ldap_intermediate: err=%d oid=%s len=%ld\n",
+ rs->sr_err,
+ rs->sr_rspoid ? rs->sr_rspoid : "",
+ rs->sr_rspdata != NULL ? rs->sr_rspdata->bv_len : 0 );
+#endif
+ rs->sr_tag = LDAP_RES_INTERMEDIATE;
+ rs->sr_msgid = op->o_msgid;
+ send_ldap_response( op, rs );