From 087b97c2c5552f86554b05a343dd708ebacd5253 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 21 Feb 2005 11:28:59 +0000 Subject: [PATCH] Use backend#0 for config, tools default to #1 --- servers/slapd/bconfig.c | 5 +---- servers/slapd/slapcommon.c | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 6c556bd1ff..b194f11297 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -344,6 +344,7 @@ config_back_initialize( BackendInfo *bi ) return 0; } + void config_back_init( ConfigFile *cfp, ConfigTable *ct ) { BackendInfo bi = {0}; @@ -355,10 +356,6 @@ void config_back_init( ConfigFile *cfp, ConfigTable *ct ) bi.bi_init = config_back_initialize; bi.bi_cf_table = ct; backend_add( &bi ); - /* FIXME */ - if ( slapMode & SLAP_TOOL_MODE ) { - return; - } be = backend_db_init( bi.bi_type ); ber_str2bv( CONFIG_DN, 0, 1, &be->be_rootdn ); ber_dupbv( &be->be_rootndn, &be->be_rootdn ); diff --git a/servers/slapd/slapcommon.c b/servers/slapd/slapcommon.c index 41642c6ced..56c2b613c1 100644 --- a/servers/slapd/slapcommon.c +++ b/servers/slapd/slapcommon.c @@ -201,7 +201,7 @@ slap_tool_init( break; case 'n': /* which config file db to index */ - dbnum = atoi( optarg ) - 1; + dbnum = atoi( optarg ); break; case 'q': /* turn on quick */ @@ -441,7 +441,7 @@ slap_tool_init( exit( EXIT_FAILURE ); } - be = &backends[dbnum=0]; + be = &backends[dbnum=1]; /* If just doing the first by default and it is a * glue subordinate, find the master. */ -- 2.39.5