mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 15:49:34 -05:00
More errno handling changes for FreeBSD LinuxThreads.
This commit is contained in:
parent
6743aebf3d
commit
a28f9e03be
3 changed files with 12 additions and 9 deletions
|
|
@ -61,11 +61,11 @@ bdb2i_enter_backend_rw( DB_LOCK *lock, int writer )
|
|||
writer ? "write" : "read", 0, 0 );
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
ret = errno;
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"bdb2i_enter_backend() -- %s lock returned ERROR: %s\n",
|
||||
writer ? "write" : "read", strerror( errno ), 0 );
|
||||
ret = errno;
|
||||
writer ? "write" : "read", strerror( ret ), 0 );
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
@ -130,10 +130,10 @@ bdb2i_leave_backend_rw( DB_LOCK lock, int writer )
|
|||
break;
|
||||
|
||||
default:
|
||||
ret_lock = errno;
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"bdb2i_leave_backend() -- %s lock returned ERROR: %s\n",
|
||||
writer ? "write" : "read", strerror( errno ), 0 );
|
||||
ret_lock = errno;
|
||||
writer ? "write" : "read", strerror( ret_lock ), 0 );
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,10 +316,11 @@ bdb2i_check_additional_attr_index( struct ldbminfo *li )
|
|||
struct dirent *file;
|
||||
|
||||
if ( ( datadir = opendir( li->li_directory ) ) == NULL ) {
|
||||
int err = errno;
|
||||
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"bdb2i_check_additional_attr_index(): ERROR while opening datadir: %s\n",
|
||||
strerror( errno ), 0, 0 );
|
||||
strerror( err ), 0, 0 );
|
||||
return( 1 );
|
||||
|
||||
}
|
||||
|
|
@ -689,8 +690,9 @@ bdb2i_start_transction( DB_TXNMGR *txmgr )
|
|||
txn_do_abort = 0;
|
||||
|
||||
if (( rc = txn_begin( txmgr, NULL, &txnid )) != 0 ) {
|
||||
int err = errno;
|
||||
Debug( LDAP_DEBUG_ANY, "bdb2i_start_transction failed: %d: errno=%s\n",
|
||||
rc, strerror( errno ), 0 );
|
||||
rc, strerror( err ), 0 );
|
||||
|
||||
if ( txnid != NULL )
|
||||
(void) txn_abort( txnid );
|
||||
|
|
|
|||
|
|
@ -92,10 +92,11 @@ ldbm_cache_open(
|
|||
|
||||
if ( (li->li_dbcache[i].dbc_db = ldbm_open( buf, flags, li->li_mode,
|
||||
li->li_dbcachesize )) == NULL ) {
|
||||
int err = errno;
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"<= ldbm_cache_open NULL \"%s\" errno %d reason \"%s\")\n",
|
||||
buf, errno, errno > -1 && errno < sys_nerr ?
|
||||
sys_errlist[errno] : "unknown" );
|
||||
buf, err, err > -1 && err < sys_nerr ?
|
||||
sys_errlist[err] : "unknown" );
|
||||
ldap_pvt_thread_mutex_unlock( &li->li_dbcache_mutex );
|
||||
return( NULL );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue