mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 10:09:43 -05:00
log the cause of the error when ldap_result() returns -1
This commit is contained in:
parent
0b23dff298
commit
3e99679ca4
1 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue