mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Add some error check to be DB_thread checks
This commit is contained in:
parent
d7d20254ac
commit
af79d6e354
2 changed files with 241 additions and 233 deletions
|
|
@ -354,18 +354,22 @@ main()
|
|||
|
||||
#ifdef DB_CDB_ALLDB
|
||||
rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
|
||||
if( rc ) goto done;
|
||||
if( rc == 0 )
|
||||
#endif
|
||||
|
||||
{
|
||||
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
|
||||
rc = env->open( env, NULL, flags, 0 );
|
||||
#else
|
||||
rc = env->open( env, NULL, NULL, flags, 0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
if( rc ) {
|
||||
printf("BerkeleyDB: %s\n", db_strerror(rc) );
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef DB_CDB_ALLDB
|
||||
done:
|
||||
#endif
|
||||
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
|
||||
env->remove( env, NULL, DB_FORCE );
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue