]> git.sur5r.net Git - openldap/commitdiff
log the cause of the error when ldap_result() returns -1
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 23 Sep 2003 23:41:57 +0000 (23:41 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 23 Sep 2003 23:41:57 +0000 (23:41 +0000)
servers/slapd/syncrepl.c

index 120c0aad06f0d2f3c9b74dcb8bd6209c96dfb85d..7b8206b5f9fdcea6a71ad14c7d132bbb06d34c33 100644 (file)
@@ -643,12 +643,18 @@ do_syncrepl(
        }
 
        if ( rc == -1 ) {
+               int errno;
+               const char *errstr;
+
+               ldap_get_option( ld, LDAP_OPT_ERROR_NUMBER, &errno );
+               errstr = ldap_err2string( errno );
+               
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR,
-                       "do_syncrepl : unknown result\n", 0, 0, 0 );
+                       "do_syncrepl : %s\n", errstr, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
-                       "do_syncrepl : unknown result\n", 0, 0, 0 );
+                       "do_syncrepl : %s\n", errstr, 0, 0 );
 #endif
        }