From 20359f2020b0a6fa87b259b6aa5f2defbffdc7af Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 24 Aug 2009 00:41:12 +0000 Subject: [PATCH] fix previous commit (ITS#6267) --- servers/slapd/back-ldap/back-ldap.h | 1 + servers/slapd/back-ldap/init.c | 3 ++- servers/slapd/back-meta/bind.c | 4 ++-- servers/slapd/back-meta/conn.c | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/servers/slapd/back-ldap/back-ldap.h b/servers/slapd/back-ldap/back-ldap.h index aa01eb5642..e5d43d107e 100644 --- a/servers/slapd/back-ldap/back-ldap.h +++ b/servers/slapd/back-ldap/back-ldap.h @@ -452,6 +452,7 @@ typedef struct ldap_extra_t { void (*retry_info_destroy)( slap_retry_info_t *ri ); int (*retry_info_parse)( char *in, slap_retry_info_t *ri, char *buf, ber_len_t buflen ); int (*retry_info_unparse)( slap_retry_info_t *ri, struct berval *bvout ); + int (*connid2str)( const ldapconn_base_t *lc, char *buf, ber_len_t buflen ); } ldap_extra_t; LDAP_END_DECL diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 6c9979bd50..3d0cc728f1 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -39,7 +39,8 @@ static const ldap_extra_t ldap_extra = { slap_idassert_parse_cf, slap_retry_info_destroy, slap_retry_info_parse, - slap_retry_info_unparse + slap_retry_info_unparse, + ldap_back_connid2str }; int diff --git a/servers/slapd/back-meta/bind.c b/servers/slapd/back-meta/bind.c index d6962358ff..880835349b 100644 --- a/servers/slapd/back-meta/bind.c +++ b/servers/slapd/back-meta/bind.c @@ -663,7 +663,7 @@ meta_back_dobind( if ( LogTest( LDAP_DEBUG_TRACE ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_TRACE, "%s meta_back_dobind: conn=%s%s\n", @@ -803,7 +803,7 @@ retry_ok:; done:; if ( LogTest( LDAP_DEBUG_TRACE ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_TRACE, "%s meta_back_dobind: conn=%s bound=%d\n", diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index ab7d77360c..7ab1511b8b 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -1170,7 +1170,7 @@ retry_lock:; if ( LogTest( LDAP_DEBUG_TRACE ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_TRACE, "%s meta_back_getconn: mc=%p conn=%s expired (tainted).\n", @@ -1662,7 +1662,7 @@ done:; LDAP_BACK_CONN_CACHED_CLEAR( mc ); if ( LogTest( LDAP_DEBUG_ANY ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_ANY, "%s meta_back_getconn: candidates=%d conn=%s insert failed\n", @@ -1683,7 +1683,7 @@ done:; if ( LogTest( LDAP_DEBUG_TRACE ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_TRACE, "%s meta_back_getconn: candidates=%d conn=%s inserted\n", @@ -1693,7 +1693,7 @@ done:; } else { if ( LogTest( LDAP_DEBUG_TRACE ) ) { char buf[STRLENOF("4294967295U") + 1] = { 0 }; - ldap_back_connid2str( &mc->mc_base, buf, sizeof(buf) ); + mi->mi_ldap_extra->connid2str( &mc->mc_base, buf, sizeof(buf) ); Debug( LDAP_DEBUG_TRACE, "%s meta_back_getconn: candidates=%d conn=%s fetched\n", -- 2.39.5