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;
}
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;
}
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 );
}
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 );
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 );
}