From: Jong Hyuk Choi Date: Tue, 23 Sep 2003 23:41:57 +0000 (+0000) Subject: log the cause of the error when ldap_result() returns -1 X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~663 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e99679ca4a07b8c814cf0c8effac8eab9e0102a;p=openldap log the cause of the error when ldap_result() returns -1 --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 120c0aad06..7b8206b5f9 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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 }