From cf9c53601a64b4198eb3c385df0d61f4722939d9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 13 Feb 2008 15:25:29 +0000 Subject: [PATCH] Removed the 'defrag databases' stub function and command line option from the citserver. This is a vestige of the GDBM days and we're never going back there. --- citadel/citserver.c | 5 ----- citadel/citserver.h | 1 - citadel/database.h | 1 - citadel/database_sleepycat.c | 13 ------------- citadel/server_main.c | 13 ++----------- 5 files changed, 2 insertions(+), 31 deletions(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index be41bf3a5..abfb31db2 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -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"); diff --git a/citadel/citserver.h b/citadel/citserver.h index b3d3346fd..ce155bd9a 100644 --- a/citadel/citserver.h +++ b/citadel/citserver.h @@ -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); diff --git a/citadel/database.h b/citadel/database.h index c4aac796e..c20144690 100644 --- a/citadel/database.h +++ b/citadel/database.h @@ -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); diff --git a/citadel/database_sleepycat.c b/citadel/database_sleepycat.c index ce21e8319..01cfb3162 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -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 */ diff --git a/citadel/server_main.c b/citadel/server_main.c index 2be4109c5..61eec859a 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -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(¶ms); - 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 -- 2.30.2