[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.12, 1.13 import.c, 1.6, 1.7 import.h, 1.6, 1.7 import-threads.c, 1.10, 1.11 init.c, 1.6, 1.7 ldif2ldbm.c, 1.9, 1.10 proto-back-ldbm.h, 1.7, 1.8 upgrade.c, 1.4, 1.5

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Fri Nov 10 01:13:49 UTC 2006


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11098/ldap/servers/slapd/back-ldbm

Modified Files:
	dblayer.c import.c import.h import-threads.c init.c 
	ldif2ldbm.c proto-back-ldbm.h upgrade.c 
Log Message:
Resolves: #214728
Summary: Cleaning up obsolete macros in the build
Changes: eliminated macro UPGRADEDB (Comment #6)



Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- dblayer.c	7 Nov 2006 04:20:14 -0000	1.12
+++ dblayer.c	10 Nov 2006 01:13:47 -0000	1.13
@@ -1719,12 +1719,10 @@
                           "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 @@
     return 0;
 }
 
-#ifdef UPGRADEDB
 /*
  * dblayer_get_aux_id2entry:
  * - create a dedicated db env and db handler for id2entry.
@@ -2222,7 +2219,6 @@
         slapi_ch_free_string(&inst_dirp);
     return 0;
 }
-#endif
 
 int dblayer_close_indexes(backend *be)
 {
@@ -5387,7 +5383,6 @@
     }
     /* 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 @@
             adjust_idl_switch(ldbmversion, li);
         }
     }
-#endif
 
     return_value = check_db_version(li, &action);
     if (action & DBVERSION_UPGRADE_3_4)


Index: import.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- import.c	6 Dec 2005 18:28:14 -0000	1.6
+++ import.c	10 Nov 2006 01:13:47 -0000	1.7
@@ -1116,7 +1116,6 @@
         /* 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 @@
             }
         }
         else
-#endif
         {
             import_log_notice(job, "Beginning import job...");
             if (! CREATE_THREAD(PR_USER_THREAD, (VFP)import_producer, producer,
@@ -1427,10 +1425,8 @@
     }
 
     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++)


Index: import.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- import.h	11 Apr 2006 02:14:45 -0000	1.6
+++ import.h	10 Nov 2006 01:13:47 -0000	1.7
@@ -157,9 +157,7 @@
                                          * 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 @@
 
 /* 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);


Index: import-threads.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-threads.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- import-threads.c	6 Nov 2006 20:51:32 -0000	1.10
+++ import-threads.c	10 Nov 2006 01:13:47 -0000	1.11
@@ -620,7 +620,6 @@
     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 @@
     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 @@
             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 @@
 
 
         /* 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;
 


Index: init.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/init.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- init.c	19 Apr 2005 22:07:38 -0000	1.6
+++ init.c	10 Nov 2006 01:13:47 -0000	1.7
@@ -202,10 +202,8 @@
 	    (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,


Index: ldif2ldbm.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ldif2ldbm.c	11 Apr 2006 02:14:45 -0000	1.9
+++ ldif2ldbm.c	10 Nov 2006 01:13:47 -0000	1.10
@@ -1927,7 +1927,6 @@
 	return( rc );
 }
 
-#if defined(UPGRADEDB)
 /*
  * ldbm_back_upgradedb - 
  *
@@ -2468,4 +2467,3 @@
     ldbm_back_ldif2ldbm_deluxe(pb);
 }
 
-#endif /* UPGRADEDB */


Index: proto-back-ldbm.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- proto-back-ldbm.h	1 Sep 2006 21:25:14 -0000	1.7
+++ proto-back-ldbm.h	10 Nov 2006 01:13:47 -0000	1.8
@@ -433,9 +433,7 @@
 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 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);
 


Index: upgrade.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/upgrade.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- upgrade.c	19 Apr 2005 22:07:38 -0000	1.4
+++ upgrade.c	10 Nov 2006 01:13:47 -0000	1.5
@@ -205,7 +205,6 @@
     return rval;
 }
 
-#if defined(UPGRADEDB)
 /*
  * adjust_idl_switch
  * if the current nsslapd-idl-switch is different from ldbmversion,
@@ -264,7 +263,6 @@
     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




More information about the Fedora-directory-commits mailing list