#endif
};
-extern int ldbm_ignore_nextid_file;
-
LDAP_END_DECL
#include "proto-back-ldbm.h"
#include "slap.h"
#include "back-ldbm.h"
-int ldbm_ignore_nextid_file = 0;
-
int
ldbm_back_db_config(
#include "slap.h"
#include "back-ldbm.h"
-/* All functions except put_nextid() obey ldbm_ignore_nextid_file. */
+/* All functions except put_nextid() obey slapMode == SLAP_TOOL_MODE. */
static ID next_id_read( Backend *be );
static ID next_id_get_save( Backend *be, int do_save );
#define next_id_write( be, id ) \
- (ldbm_ignore_nextid_file ? (be, id, 0) : put_nextid( be, id ))
+ (slapMode == SLAP_TOOL_MODE ? (be, id, 0) : put_nextid( be, id ))
static ID
next_id_read( Backend *be )
char* file = li->li_nextid_file;
FILE* fp;
- if ( ldbm_ignore_nextid_file )
+ if ( slapMode == SLAP_TOOL_MODE )
return NOID;
if ( (fp = fopen( file, "r" )) == NULL ) {
case SLAP_SERVER_MODE:
case SLAP_TOOL_MODE:
-#ifdef SLAPD_BDB2
+#ifdef SLAP_TIMEDSERVER_MODE
case SLAP_TIMEDSERVER_MODE:
- case SLAP_TOOLID_MODE:
#endif
+ case SLAP_TOOLID_MODE:
Debug( LDAP_DEBUG_TRACE,
"%s init: initiated %s.\n",
- name, mode == SLAP_TOOL_MODE ? "tool" : "server", 0 );
+ name, (mode == SLAP_TOOL_MODE || mode == SLAP_TOOLID_MODE) ? "tool" : "server", 0 );
slap_name = name;
#define SLAP_TOOL_MODE 2
#ifdef SLAPD_BDB2
# define SLAP_TIMEDSERVER_MODE 3
-# define SLAP_TOOLID_MODE 4
#endif
+#define SLAP_TOOLID_MODE 4
/* temporary aliases */
typedef BackendDB Backend;
struct berval bv;
struct berval *vals[2];
- ldbm_ignore_nextid_file = 1;
-
slap_ldif_init( argc, argv, LDIF2ID2CHILDREN, "ldbm", SLAP_TOOL_MODE );
slap_startup(dbnum);
struct berval bv;
struct berval *vals[2];
- ldbm_ignore_nextid_file = 1;
-
- slap_ldif_init( argc, argv, LDIF2ID2ENTRY, "ldbm", SLAP_TOOL_MODE );
+ slap_ldif_init( argc, argv, LDIF2ID2ENTRY, "ldbm", SLAP_TOOLID_MODE );
slap_startup(dbnum);
}
maxid++;
- put_nextid( be, maxid ); /* override ldbm_ignore_nextid_file */
+ put_nextid( be, maxid );
#ifdef SLAP_CLEANUP
ldbm_cache_close( be, db );
struct berval bv;
struct berval *vals[2];
- ldbm_ignore_nextid_file = 1;
-
slap_ldif_init( argc, argv, LDIF2INDEX, "ldbm", SLAP_TOOL_MODE );
attr = attr_normalize( argv[argc - 1] );
struct berval *vals[2];
Avlnode *avltypes = NULL;
- ldbm_ignore_nextid_file = 1;
-
slap_ldif_init( argc, argv, LDIF2LDBM, "ldbm", SLAP_TOOL_MODE );
slap_startup(dbnum);