mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-10 00:45:01 -05:00
Added LDAP_LOG Messages
This commit is contained in:
parent
714ec82ca0
commit
7d162b6806
1 changed files with 21 additions and 0 deletions
|
|
@ -64,9 +64,15 @@ write_reject(
|
|||
int rjfd;
|
||||
if (( rjfd = open( rejfile, O_RDWR | O_APPEND | O_CREAT,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )) < 0 ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
|
||||
"Error: Cannot create \"%s\":%s\n",
|
||||
rejfile, sys_errlist[ errno ] ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"Error: write_reject: Cannot create \"%s\": %s\n",
|
||||
rejfile, sys_errlist[ errno ], 0 );
|
||||
#endif
|
||||
ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
|
||||
return;
|
||||
} else {
|
||||
|
|
@ -74,8 +80,13 @@ write_reject(
|
|||
}
|
||||
}
|
||||
if (( rc = acquire_lock( rejfile, &rfp, &lfp )) < 0 ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
|
||||
"Error: Cannot open reject file \"%s\"\n", rejfile ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "Error: cannot open reject file \"%s\"\n",
|
||||
rejfile, 0, 0 );
|
||||
#endif
|
||||
} else {
|
||||
fseek( rfp, 0, 2 );
|
||||
if ( errmsg != NULL ) {
|
||||
|
|
@ -84,14 +95,24 @@ write_reject(
|
|||
fprintf( rfp, "%s: %s\n", ERROR_STR, ldap_err2string( lderr ));
|
||||
}
|
||||
if ((rc = re->re_write( ri, re, rfp )) < 0 ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
|
||||
"Error: Cannot write reject file \"%s\"\n", rejfile ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"Error: cannot write reject file \"%s\"\n",
|
||||
rejfile, 0, 0 );
|
||||
#endif
|
||||
}
|
||||
(void) relinquish_lock( rejfile, rfp, lfp );
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "reject", LDAP_LEVEL_ERR, "write_reject: "
|
||||
"Error: ldap operation failed, data written to \"%s\"\n", rejfile ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"Error: ldap operation failed, data written to \"%s\"\n",
|
||||
rejfile, 0, 0 );
|
||||
#endif
|
||||
}
|
||||
ldap_pvt_thread_mutex_unlock( &sglob->rej_mutex );
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue