summaryrefslogtreecommitdiffstats
path: root/ldap/servers
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2006-11-10 01:13:47 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2006-11-10 01:13:47 +0000
commit823cf6940a435b667a5c27c3dcc80f60829f1a3c (patch)
tree00ebf577f985cc33614096a0354d54c6c5e24030 /ldap/servers
parent774a36c8dce821975ecd014b682a51ae2d9c9537 (diff)
downloadds-823cf6940a435b667a5c27c3dcc80f60829f1a3c.tar.gz
ds-823cf6940a435b667a5c27c3dcc80f60829f1a3c.tar.xz
ds-823cf6940a435b667a5c27c3dcc80f60829f1a3c.zip
Resolves: #214728
Summary: Cleaning up obsolete macros in the build Changes: eliminated macro UPGRADEDB (Comment #6)
Diffstat (limited to 'ldap/servers')
-rw-r--r--ldap/servers/slapd/back-ldbm/dblayer.c6
-rw-r--r--ldap/servers/slapd/back-ldbm/import-threads.c6
-rw-r--r--ldap/servers/slapd/back-ldbm/import.c4
-rw-r--r--ldap/servers/slapd/back-ldbm/import.h4
-rw-r--r--ldap/servers/slapd/back-ldbm/init.c2
-rw-r--r--ldap/servers/slapd/back-ldbm/ldif2ldbm.c2
-rw-r--r--ldap/servers/slapd/back-ldbm/proto-back-ldbm.h4
-rw-r--r--ldap/servers/slapd/back-ldbm/upgrade.c2
-rw-r--r--ldap/servers/slapd/pblock.c4
-rw-r--r--ldap/servers/slapd/protect_db.c4
-rw-r--r--ldap/servers/slapd/protect_db.h2
-rw-r--r--ldap/servers/slapd/slapi-private.h4
-rw-r--r--ldap/servers/slapd/task.c6
13 files changed, 0 insertions, 50 deletions
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
index d117d1d9..562a7cf9 100644
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
@@ -1719,12 +1719,10 @@ int dblayer_instance_start(backend *be, int mode)
"file in %s\n", inst->inst_dir_name, 0, 0);
} else {
int rval = 0;
-#if defined(UPGRADEDB)
/* check the DBVERSION and reset idl-switch if needed (DS6.2) */
/* from the next major rel, we won't do this and just upgrade */
if (!(li->li_flags & LI_FORCE_MOD_CONFIG))
adjust_idl_switch(ldbmversion, li);
-#endif
/* check to make sure these instance was made with the correct
* version. */
@@ -2022,7 +2020,6 @@ int dblayer_release_id2entry(backend *be, DB *pDB)
return 0;
}
-#ifdef UPGRADEDB
/*
* dblayer_get_aux_id2entry:
* - create a dedicated db env and db handler for id2entry.
@@ -2222,7 +2219,6 @@ done:
slapi_ch_free_string(&inst_dirp);
return 0;
}
-#endif
int dblayer_close_indexes(backend *be)
{
@@ -5387,7 +5383,6 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
}
/* We're done ! */
-#if defined(UPGRADEDB)
/* [605024] check the DBVERSION and reset idl-switch if needed */
if (dbversion_exists(li, home_dir))
{
@@ -5404,7 +5399,6 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
adjust_idl_switch(ldbmversion, li);
}
}
-#endif
return_value = check_db_version(li, &action);
if (action & DBVERSION_UPGRADE_3_4)
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index 555e6417..d4d7cc20 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -620,7 +620,6 @@ error:
info->state = ABORTED;
}
-#if defined(UPGRADEDB)
/* producer thread for re-indexing:
* read id2entry, parsing entries (str2entry) (needed???), assigning
* them IDs (again, needed???) and queueing them on the entry FIFO.
@@ -855,7 +854,6 @@ error:
dblayer_release_aux_id2entry( be, db, env );
info->state = ABORTED;
}
-#endif
static void
import_wait_for_space_in_fifo(ImportJob *job, size_t new_esize)
@@ -1090,9 +1088,7 @@ void import_foreman(void *param)
goto error;
}
-#if defined (UPGRADEDB)
if (!(job->flags & FLAG_REINDEXING))/* reindex reads data from id2entry */
-#endif
{
/* insert into the id2entry index
* (that isn't really an index -- it's the storehouse of the entries
@@ -1144,9 +1140,7 @@ void import_foreman(void *param)
/* Remove the entry from the cache (caused by id2entry_add) */
-#if defined (UPGRADEDB)
if (!(job->flags & FLAG_REINDEXING))/* reindex reads data from id2entry */
-#endif
cache_remove(&inst->inst_cache, fi->entry);
fi->entry->ep_refcnt = job->number_indexers;
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
index 62169dc8..7d9ae285 100644
--- a/ldap/servers/slapd/back-ldbm/import.c
+++ b/ldap/servers/slapd/back-ldbm/import.c
@@ -1116,7 +1116,6 @@ int import_main_offline(void *arg)
/* start the producer */
import_init_worker_info(producer, job);
producer->work_type = PRODUCER;
-#if defined(UPGRADEDB)
if (job->flags & FLAG_REINDEXING)
{
if (! CREATE_THREAD(PR_USER_THREAD, (VFP)index_producer, producer,
@@ -1132,7 +1131,6 @@ int import_main_offline(void *arg)
}
}
else
-#endif
{
import_log_notice(job, "Beginning import job...");
if (! CREATE_THREAD(PR_USER_THREAD, (VFP)import_producer, producer,
@@ -1427,10 +1425,8 @@ int ldbm_back_ldif2ldbm_deluxe(Slapi_PBlock *pb)
}
job->flags = FLAG_USE_FILES;
-#if defined(UPGRADEDB)
if (NULL == name_array) /* no ldif file is given -> reindexing */
job->flags |= FLAG_REINDEXING;
-#endif
if (!noattrindexes)
job->flags |= FLAG_INDEX_ATTRS;
for (i = 0; name_array && name_array[i] != NULL; i++)
diff --git a/ldap/servers/slapd/back-ldbm/import.h b/ldap/servers/slapd/back-ldbm/import.h
index 72dbd495..04b79855 100644
--- a/ldap/servers/slapd/back-ldbm/import.h
+++ b/ldap/servers/slapd/back-ldbm/import.h
@@ -157,9 +157,7 @@ typedef struct {
* for replica initialization */
#define FLAG_ABORT 0x08 /* import has been aborted */
#define FLAG_ONLINE 0x10 /* bring backend online when done */
-#if defined(UPGRADEDB)
#define FLAG_REINDEXING 0x20 /* read from id2entry and do indexing */
-#endif
/* Structure holding stuff about a worker thread and what it's up to */
@@ -229,9 +227,7 @@ int add_op_attrs(Slapi_PBlock *pb, struct ldbminfo *li, struct backentry *ep,
/* import-threads.c */
void import_producer(void *param);
-#if defined(UPGRADEDB)
void index_producer(void *param);
-#endif
void import_foreman(void *param);
void import_worker(void *param);
static void import_wait_for_space_in_fifo(ImportJob *job, size_t new_esize);
diff --git a/ldap/servers/slapd/back-ldbm/init.c b/ldap/servers/slapd/back-ldbm/init.c
index 689dca72..065e8f2a 100644
--- a/ldap/servers/slapd/back-ldbm/init.c
+++ b/ldap/servers/slapd/back-ldbm/init.c
@@ -202,10 +202,8 @@ ldbm_back_init( Slapi_PBlock *pb )
(void *) ldbm_back_archive2ldbm );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_DB2ARCHIVE_FN,
(void *) ldbm_back_ldbm2archive );
-#if defined(UPGRADEDB)
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_UPGRADEDB_FN,
(void *) ldbm_back_upgradedb );
-#endif
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_BEGIN_FN,
(void *) dblayer_plugin_begin );
rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_COMMIT_FN,
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 07aa3e58..51998ec3 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -1927,7 +1927,6 @@ ldbm_exclude_attr_from_export( struct ldbminfo *li , const char *attr,
return( rc );
}
-#if defined(UPGRADEDB)
/*
* ldbm_back_upgradedb -
*
@@ -2468,4 +2467,3 @@ void upgradedb_core(Slapi_PBlock *pb, ldbm_instance *inst)
ldbm_back_ldif2ldbm_deluxe(pb);
}
-#endif /* UPGRADEDB */
diff --git a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
index 35894dd3..87873ab9 100644
--- a/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
@@ -433,9 +433,7 @@ int ldbm_back_ldbm2ldifalt( Slapi_PBlock *pb );
int ldbm_back_ldbm2index( Slapi_PBlock *pb );
int ldbm_back_archive2ldbm( Slapi_PBlock *pb );
int ldbm_back_ldbm2archive( Slapi_PBlock *pb );
-#if defined(UPGRADEDB)
int ldbm_back_upgradedb( Slapi_PBlock *pb );
-#endif
int ldbm_back_next_search_entry( Slapi_PBlock *pb );
int ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension );
int ldbm_back_db_test( Slapi_PBlock *pb );
@@ -536,9 +534,7 @@ int matchrule_values_to_keys_sv(Slapi_PBlock *pb,Slapi_Value **input_values, Sla
*/
int check_db_version(struct ldbminfo *li, int *action);
int check_db_inst_version(ldbm_instance *inst);
-#if defined(UPGRADEDB)
int adjust_idl_switch(char *ldbmversion, struct ldbminfo *li);
-#endif
int ldbm_upgrade(ldbm_instance *inst, int action);
int lookup_dbversion(char *dbversion, int flag);
diff --git a/ldap/servers/slapd/back-ldbm/upgrade.c b/ldap/servers/slapd/back-ldbm/upgrade.c
index 7c932ee5..3b669e1b 100644
--- a/ldap/servers/slapd/back-ldbm/upgrade.c
+++ b/ldap/servers/slapd/back-ldbm/upgrade.c
@@ -205,7 +205,6 @@ check_db_inst_version( ldbm_instance *inst )
return rval;
}
-#if defined(UPGRADEDB)
/*
* adjust_idl_switch
* if the current nsslapd-idl-switch is different from ldbmversion,
@@ -264,7 +263,6 @@ adjust_idl_switch(char *ldbmversion, struct ldbminfo *li)
li->li_flags &= ~LI_FORCE_MOD_CONFIG;
return rval;
}
-#endif
/* Do the work to upgrade a database if needed */
/* When we're called, the database files have been opened, and any
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index 48e9f998..11ce4ca7 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -604,14 +604,12 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
}
(*(IFP *)value) = pblock->pb_plugin->plg_db2archive;
break;
-#if defined(UPGRADEDB)
case SLAPI_PLUGIN_DB_UPGRADEDB_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
}
(*(IFP *)value) = pblock->pb_plugin->plg_upgradedb;
break;
-#endif
case SLAPI_PLUGIN_DB_BEGIN_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
@@ -1875,14 +1873,12 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
}
pblock->pb_plugin->plg_db2archive = (IFP) value;
break;
-#if defined(UPGRADEDB)
case SLAPI_PLUGIN_DB_UPGRADEDB_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
}
pblock->pb_plugin->plg_upgradedb = (IFP) value;
break;
-#endif
case SLAPI_PLUGIN_DB_BEGIN_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
diff --git a/ldap/servers/slapd/protect_db.c b/ldap/servers/slapd/protect_db.c
index 33ef5626..44c16804 100644
--- a/ldap/servers/slapd/protect_db.c
+++ b/ldap/servers/slapd/protect_db.c
@@ -479,7 +479,6 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
result = 0;
}
break;
-#if defined(UPGRADEDB)
case SLAPD_EXEMODE_UPGRADEDB:
if (running || importing || exporting) {
LDAPDebug(LDAP_DEBUG_ANY, NO_UPGRADEDB_DUE_TO_USE, 0, 0, 0);
@@ -489,7 +488,6 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
result = 0;
}
break;
-#endif
case SLAPD_EXEMODE_DBTEST:
if (running || importing || exporting) {
LDAPDebug(LDAP_DEBUG_ANY, NO_DBTEST_DUE_TO_USE, 0, 0, 0);
@@ -750,7 +748,6 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
result = 0;
}
break;
-#if defined(UPGRADEDB)
case SLAPD_EXEMODE_UPGRADEDB:
if ( mutex_exists( serverMutexName ) ||
mutex_exists( importMutexName ) ||
@@ -762,7 +759,6 @@ add_new_slapd_process(int exec_mode, int r_flag, int skip_flag)
result = 0;
}
break;
-#endif
case SLAPD_EXEMODE_DBTEST:
if ( mutex_exists( serverMutexName ) ||
mutex_exists( importMutexName ) ||
diff --git a/ldap/servers/slapd/protect_db.h b/ldap/servers/slapd/protect_db.h
index 9c6e1a6e..3e47481c 100644
--- a/ldap/servers/slapd/protect_db.h
+++ b/ldap/servers/slapd/protect_db.h
@@ -95,9 +95,7 @@ void remove_slapd_process();
#define NO_DB2INDEX_DUE_TO_USE "Unable to create an index because the database is being used by another slapd process.\n"
-#if defined(UPGRADEDB)
#define NO_UPGRADEDB_DUE_TO_USE "Unable to recreate index files because the database is being used by another slapd process.\n"
-#endif
#define CREATE_MUTEX_ERROR "Error - CreateMutex failed: %s\n"
/* reason for failure */
diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h
index fdb883d1..f53f5e21 100644
--- a/ldap/servers/slapd/slapi-private.h
+++ b/ldap/servers/slapd/slapi-private.h
@@ -825,9 +825,7 @@ int valuearray_find(const Slapi_Attr *a, Slapi_Value **va, const Slapi_Value *v)
#define SLAPI_PLUGIN_DB_ENTRY_RELEASE_FN 230
#define SLAPI_PLUGIN_DB_INIT_INSTANCE_FN 231
#define SLAPI_PLUGIN_DB_WIRE_IMPORT_FN 234
-#if defined(UPGRADEDB)
#define SLAPI_PLUGIN_DB_UPGRADEDB_FN 235
-#endif
/* database plugin-specific parameters */
#define SLAPI_PLUGIN_DB_NO_ACL 250
#define SLAPI_PLUGIN_DB_RMDB_FN 280
@@ -1231,11 +1229,9 @@ void slapi_task_log_notice(Slapi_Task *task, char *format, ...)
void DS_Sleep(PRIntervalTime ticks);
-#if defined(UPGRADEDB)
/* macro to specify the behavior of upgradedb */
#define SLAPI_UPGRADEDB_FORCE 0x1 /* reindex all (no check w/ idl switch) */
#define SLAPI_UPGRADEDB_SKIPINIT 0x2 /* call upgradedb as part of other op */
-#endif
/*
* Macro to set port to the 'port' field of a NSPR PRNetAddr union.
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index 76495f27..e3dfc191 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -56,9 +56,7 @@ static int shutting_down = 0;
#define TASK_BACKUP_DN "cn=backup, cn=tasks, cn=config"
#define TASK_RESTORE_DN "cn=restore, cn=tasks, cn=config"
#define TASK_INDEX_DN "cn=index, cn=tasks, cn=config"
-#if defined(UPGRADEDB)
#define TASK_UPGRADEDB_DN "cn=upgradedb, cn=tasks, cn=config"
-#endif
#define TASK_LOG_NAME "nsTaskLog"
#define TASK_STATUS_NAME "nsTaskStatus"
@@ -1367,7 +1365,6 @@ out:
return rv;
}
-#if defined(UPGRADEDB)
static int
task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
int *returncode, char *returntext, void *arg)
@@ -1465,7 +1462,6 @@ out:
*returncode = LDAP_SUCCESS;
return SLAPI_DSE_CALLBACK_OK;
}
-#endif
/* update attributes in the entry under "cn=tasks" to match the current
* status of the task.
@@ -1697,9 +1693,7 @@ void task_init(void)
slapi_task_register_handler("backup", task_backup_add);
slapi_task_register_handler("restore", task_restore_add);
slapi_task_register_handler("index", task_index_add);
-#if defined(UPGRADEDB)
slapi_task_register_handler("upgradedb", task_upgradedb_add);
-#endif
}
/* called when the server is shutting down -- abort all existing tasks */