if ( (db = ldbm_cache_open( be, "nextid", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "next_id_read: could not open/create nextid%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "next_id_read: could not open/create nextid%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create nextid" LDBM_SUFFIX "\n",
0, 0, 0 );
if ( (db = ldbm_cache_open( be, "nextid", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "next_id_write: Could not open/create nextid%s\n", LDBM_SUFFIX ));
+ LDAP_LOG( BACK_LDBM, CRIT,
+ "next_id_write: Could not open/create nextid%s\n", LDBM_SUFFIX, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "Could not open/create nextid" LDBM_SUFFIX "\n",
0, 0, 0 );
*idp = NOID;
- ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex );
-
if ( li->li_nextid == NOID ) {
if ( ( rc = next_id_read( be, idp ) ) ) {
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
return( rc );
}
li->li_nextid = *idp;
*idp = li->li_nextid;
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
return( rc );
}
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
int rc = 0;
- ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex );
-
if ( li->li_nextid == NOID ) {
if ( ( rc = next_id_read( be, idp ) ) ) {
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
return( rc );
}
li->li_nextid = *idp;
rc = -1;
}
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
return( rc );
}