]> git.sur5r.net Git - openldap/commitdiff
ITS#7543 Fix log output "conn=-1 ... ACCEPT"
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 18 Mar 2013 19:28:07 +0000 (20:28 +0100)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 18 Mar 2013 19:28:07 +0000 (20:28 +0100)
servers/slapd/connection.c
servers/slapd/daemon.c

index 923d8f0b7bfd9662a63fd8ce67347ce0599cf4b0..e34703cb384243b8e4bfc6b04e4069881e6118cf 100644 (file)
@@ -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;
 }
 
index 2a5d3e36dae2bff3f31cc3d3a560c83823313583..31e4fcf8b7c4c27b72c15e336288d94942b25f0d 100644 (file)
@@ -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;
 }