From: Pierangelo Masarati Date: Sat, 20 Aug 2005 19:20:53 +0000 (+0000) Subject: fix referral logging @STATS2 X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~635 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=919781ea4522f164dfc18a85f65ce30dff652259;p=openldap fix referral logging @STATS2 --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 8633d64326..6ee58c16a3 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1333,10 +1333,19 @@ slap_send_search_reference( Operation *op, SlapReply *rs ) #ifdef LDAP_CONNECTIONLESS } #endif + if ( rs->sr_ref != NULL ) { + int r; - Statslog( LDAP_DEBUG_STATS2, "%s REF dn=\"%s\"\n", - op->o_log_prefix, rs->sr_entry ? rs->sr_entry->e_dn : "(null)", - 0, 0, 0 ); + for ( r = 0; !BER_BVISNULL( &rs->sr_ref[ r ] ); r++ ) { + Statslog( LDAP_DEBUG_STATS2, "%s REF #%d \"%s\"\n", + op->o_log_prefix, r, rs->sr_ref[0].bv_val, + 0, 0 ); + } + + } else { + Statslog( LDAP_DEBUG_STATS2, "%s REF \"(null)\"\n", + op->o_log_prefix, 0, 0, 0, 0 ); + } Debug( LDAP_DEBUG_TRACE, "<= send_search_reference\n", 0, 0, 0 );