X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsysdep.c;h=1d24919c7ac02c042629948a5701b2ffb664f3a5;hb=d0a9f739a0470a1dcc5603838ee3d82508c3611e;hp=0de30ff225d27f45dbf16b776811ac6fe3ebf916;hpb=f1275c774787228d3f967eadb7cf0bdd4657e232;p=citadel.git diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 0de30ff22..1d24919c7 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -772,7 +772,9 @@ void sysdep_master_cleanup(void) { CtdlDestroyFixedOutputHooks(); CtdlDestroySessionHooks(); CtdlDestroyServiceHook(); + #ifdef HAVE_BACKTRACE eCrash_Uninit(); + #endif } @@ -1158,8 +1160,9 @@ void *worker_thread(void *arg) { cdb_allocate_tsd(); // Register for tracing + #ifdef HAVE_BACKTRACE eCrash_RegisterThread("WorkerThread", 0); - + #endif while (!time_to_die) { /* make doubly sure we're not holding any stale db handles @@ -1339,7 +1342,9 @@ SKIP_SELECT: } if (con != NULL) free (con);//// TODO: could this harm other threads? /* If control reaches this point, the server is shutting down */ + #ifdef HAVE_BACKTRACE eCrash_UnregisterThread(); + #endif return(NULL); }