From: Ondřej Kuzník Date: Mon, 3 Jul 2017 15:37:35 +0000 (+0100) Subject: More logging improvements X-Git-Tag: OPENLDAP_REL_ENG_2_5_1ALPHA~18^2~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16010e5e161e9dfdcfc96f55e0ea92fc46451700;p=thirdparty%2Fopenldap.git More logging improvements --- diff --git a/servers/lloadd/bind.c b/servers/lloadd/bind.c index 088ec3e24c..393989f76c 100644 --- a/servers/lloadd/bind.c +++ b/servers/lloadd/bind.c @@ -118,6 +118,9 @@ fail: ber_free( copy, 0 ); } ldap_pvt_thread_mutex_unlock( &upstream->c_io_mutex ); + Debug( LDAP_DEBUG_STATS, "request_bind: " + "connid=%lu bind request processing failed, closing\n", + client->c_connid ); return 1; } @@ -248,6 +251,9 @@ fail: ber_free( copy, 0 ); } ldap_pvt_thread_mutex_unlock( &upstream->c_io_mutex ); + Debug( LDAP_DEBUG_STATS, "request_bind_as_vc: " + "connid=%lu bind request processing failed, closing\n", + client->c_connid ); operation_send_reject( op, result, msg, 1 ); return 1; } diff --git a/servers/lloadd/client.c b/servers/lloadd/client.c index 5c589a3020..89af15a138 100644 --- a/servers/lloadd/client.c +++ b/servers/lloadd/client.c @@ -55,7 +55,8 @@ client_read_cb( evutil_socket_t s, short what, void *arg ) ber = c->c_currentber; if ( ber == NULL && (ber = ber_alloc()) == NULL ) { Debug( LDAP_DEBUG_ANY, "client_read_cb: " - "ber_alloc failed\n" ); + "connid=%lu, ber_alloc failed\n", + c->c_connid ); CLIENT_DESTROY(c); return; } @@ -151,7 +152,8 @@ handle_requests( void *ctx, void *arg ) if ( (ber = ber_alloc()) == NULL ) { Debug( LDAP_DEBUG_ANY, "client_read_cb: " - "ber_alloc failed\n" ); + "connid=%lu, ber_alloc failed\n", + c->c_connid ); CLIENT_DESTROY(c); return NULL; } @@ -205,7 +207,8 @@ handle_one_request( Connection *c ) op = operation_init( c, ber ); if ( !op ) { Debug( LDAP_DEBUG_ANY, "handle_one_request: " - "operation_init failed\n" ); + "connid=%lu, operation_init failed\n", + c->c_connid ); CLIENT_DESTROY(c); ber_free( ber, 1 ); return -1; diff --git a/servers/lloadd/operation.c b/servers/lloadd/operation.c index 14bd2e23cf..bfaaaa5a39 100644 --- a/servers/lloadd/operation.c +++ b/servers/lloadd/operation.c @@ -628,6 +628,9 @@ operation_send_reject( ber = c->c_pendingber; if ( ber == NULL && (ber = ber_alloc()) == NULL ) { ldap_pvt_thread_mutex_unlock( &c->c_io_mutex ); + Debug( LDAP_DEBUG_ANY, "operation_send_reject: " + "ber_alloc failed, closing connid=%lu\n", + c->c_connid ); CONNECTION_LOCK_DECREF(c); operation_destroy_from_client( op ); CLIENT_DESTROY(c);