Removed the 'defrag databases' stub function and command
authorArt Cancro <ajc@citadel.org>
Wed, 13 Feb 2008 15:25:29 +0000 (15:25 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 13 Feb 2008 15:25:29 +0000 (15:25 +0000)
line option from the citserver.  This is a vestige of
the GDBM days and we're never going back there.

citadel/citserver.c
citadel/citserver.h
citadel/database.h
citadel/database_sleepycat.c
citadel/server_main.c

index be41bf3a5d5e4e1598f7250776d39a5c6ae62f57..abfb31db24c5c67ebdb2ea0296c38c0cdd34145f 100644 (file)
@@ -70,7 +70,6 @@ struct CitContext *ContextList = NULL;
 struct CitContext* next_session = NULL;
 char *unique_session_numbers;
 int ScheduledShutdown = 0;
-int do_defrag = 0;
 time_t server_startup_time;
 int panic_fd;
 
@@ -140,10 +139,6 @@ void master_startup(void) {
        
        CtdlThreadAllocTSD();
        
-       if (do_defrag) {
-               defrag_databases();
-       }
-
        check_ref_counts();
 
        lprintf(CTDL_INFO, "Creating base rooms (if necessary)\n");
index b3d3346fd6452a1352d148616864e26b8dd65d6b..ce155bd9a0cf6ae76ed962f5df703e6d430b90f9 100644 (file)
@@ -39,7 +39,6 @@ void citproto_begin_session(void);
 void GenerateRoomDisplay(char *real_room,
                         struct CitContext *viewed,
                         struct CitContext *viewer);
-extern int do_defrag;
 extern int panic_fd;
 char CtdlCheckExpress(void);
 
index c4aac796eaac8d600ff9569389261cf1e7fa5060..c20144690b3726db6bf05bfed4e3d40164840b32 100644 (file)
@@ -4,7 +4,6 @@
 #define DATABASE_H
 
 
-void defrag_databases (void);
 void open_databases (void);
 void close_databases (void);
 int cdb_store (int cdb, void *key, int keylen, void *data, int datalen);
index ce21e8319c5ee41a743e6f441761378fa794275d..01cfb31628e9e3642f7e1303788876673c54e2d7 100644 (file)
@@ -170,19 +170,6 @@ void cdb_check_handles(void)
 }
 
 
-/*
- * Reclaim unused space in the databases.  We need to do each one of
- * these discretely, rather than in a loop.
- *
- * This is a stub function in the Sleepycat DB backend, because there is no
- * such API call available.
- */
-void defrag_databases(void)
-{
-       /* do nothing */
-}
-
-
 /*
  * Cull the database logs
  */
index 2be4109c57fdb124b2995844a123453d0a99306d..61eec859a81288214917f8b935a7a2591446a6cc 100644 (file)
@@ -138,10 +138,6 @@ int main(int argc, char **argv)
                        freopen(&argv[a][2], "w", stderr);
                }
 
-               else if (!strncmp(argv[a], "-f", 2)) {
-                       do_defrag = 1;
-               }
-
                else if (!strncmp(argv[a], "-D", 2)) {
                        dbg = 1;
                }
@@ -157,7 +153,7 @@ int main(int argc, char **argv)
                        CtdlLogPrintf(CTDL_EMERG,       "citserver: usage: "
                                        "citserver "
                                        "[-lLogFacility] "
-                                       "[-d] [-f] [-D] "
+                                       "[-d] [-D] "
                                        " [-tTraceFile]"
                                        " [-xLogLevel] [-hHomeDir]\n");
                        exit(1);
@@ -180,19 +176,14 @@ int main(int argc, char **argv)
        params.debugLevel = ECRASH_DEBUG_VERBOSE;
        params.dumpAllThreads = TRUE;
        params.useBacktraceSymbols = 1;
-///    BuildSymbolTable(&symbol_table);
-//     params.symbolTable = &symbol_table;
        params.signals[0]=SIGSEGV;
        params.signals[1]=SIGILL;
        params.signals[2]=SIGBUS;
        params.signals[3]=SIGABRT;
-
        eCrash_Init(&params);
-               
        eCrash_RegisterThread("MasterThread", 0);
-
-///    signal(SIGSEGV, cit_panic_backtrace);
 #endif
+
        /* Initialize the syslogger.  Yes, we are really using 0 as the
         * facility, because we are going to bitwise-OR the facility to
         * the severity of each message, allowing us to write to other