From f38c8b79d48cb634a3af777864ff34796c0b8a51 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 18 Mar 2013 20:28:07 +0100 Subject: [PATCH] ITS#7543 Fix log output "conn=-1 ... ACCEPT" --- servers/slapd/connection.c | 5 +++++ servers/slapd/daemon.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 923d8f0b7b..e34703cb38 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -574,6 +574,11 @@ Connection * connection_init( backend_connection_init(c); ldap_pvt_thread_mutex_unlock( &c->c_mutex ); + if ( !(flags & CONN_IS_UDP )) + Statslog( LDAP_DEBUG_STATS, + "conn=%ld fd=%ld ACCEPT from %s (%s)\n", + id, (long) s, peername, listener->sl_name.bv_val, 0 ); + return c; } diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 2a5d3e36da..31e4fcf8b7 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -2073,14 +2073,8 @@ slap_listener( "daemon: connection_init(%ld, %s, %s) failed.\n", (long) sfd, peername, sl->sl_name.bv_val ); slapd_close(sfd); - return 0; } - Statslog( LDAP_DEBUG_STATS, - "conn=%ld fd=%ld ACCEPT from %s (%s)\n", - c->c_connid, (long) sfd, peername, sl->sl_name.bv_val, - 0 ); - return 0; } -- 2.39.5