Enhance DEBUG-verbosity of ldap_open_with_timeout().
authorMichael Adam <obnox@samba.org>
Fri, 4 Jan 2008 20:54:02 +0000 (21:54 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 4 Jan 2008 21:09:36 +0000 (22:09 +0100)
Michael
(This used to be commit 9e70d1f24dd304c363a1bde97b5af618b46edc49)

source3/libads/ldap.c

index 712e7e28892505d4e8a2e3a893ee0fb44da3a104..8a2b82a61d3ddb4ea4e8dfae51bb0e4ecc0766fa 100644 (file)
@@ -56,6 +56,10 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to)
 {
        LDAP *ldp = NULL;
 
+
+       DEBUG(10, ("Opening connection to LDAP server '%s:%d', timeout "
+                  "%u seconds\n", server, port, to));
+
        /* Setup timeout */
        gotalarm = 0;
        CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
@@ -65,8 +69,10 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to)
        ldp = ldap_open(server, port);
 
        if (ldp == NULL) {
-               DEBUG(2,("Could not open LDAP connection to %s:%d: %s\n",
+               DEBUG(2,("Could not open connection to LDAP server %s:%d: %s\n",
                         server, port, strerror(errno)));
+       } else {
+               DEBUG(10, ("Connected to LDAP server '%s:%d'\n", server, port));
        }
 
        /* Teardown timeout. */