From d0a9f739a0470a1dcc5603838ee3d82508c3611e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 1 Sep 2007 08:51:52 +0000 Subject: [PATCH] * matts patch fixing the ecrash <-> autoconf interferance. --- citadel/ecrash.c | 2 +- citadel/sysdep.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/citadel/ecrash.c b/citadel/ecrash.c index f67e67762..47effcd34 100644 --- a/citadel/ecrash.c +++ b/citadel/ecrash.c @@ -21,13 +21,13 @@ #include #include #include -#include #include #include "sysdep_decls.h" #include "ecrash.h" #define NIY() printf("%s: Not Implemented Yet!\n", __FUNCTION__) #ifdef HAVE_BACKTRACE +#include static eCrashParameters gbl_params; static int gbl_fd=-1; 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); } -- 2.30.2