]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/wildfire.c
Bumped version numbers to 8.11 for upcoming release
[citadel.git] / libcitadel / lib / wildfire.c
index 744634a8b50a62f1f407f5da161788c9fbadc633..7d4499e3c036938e3056e4c4f226350eeee2cf26 100644 (file)
@@ -1,7 +1,3 @@
-/*
- * $Id: wildfire.c 6962 2009-01-18 19:33:45Z dothebart $
- */
-
 /*@{*/
 
 #include "sysdep.h"
@@ -19,7 +15,7 @@
 #endif
 
 #include "libcitadel.h"
-
+#include "libcitadellocal.h"
 
 
 ConstStr WF_MsgStrs[] = {
@@ -161,9 +157,13 @@ static int addr2lineBacktrace(StrBuf *Function,
        pche = strchr(pch, ':');
        FlushStrBuf(FileName);
        StrBufAppendBufPlain(FileName, pch, pche - pch, 0);
-       pche++;
-       *FunctionLine = atoi(pche);
-
+       if (pche != NULL)
+       {
+               pche++;
+               *FunctionLine = atoi(pche);
+       }
+       else 
+               *FunctionLine = 0;
        return 1;
 }
 
@@ -194,6 +194,14 @@ static int ParseBacktrace(char *Line,
 long BaseFrames = 0;
 StrBuf *FullBinaryName = NULL;
 
+void WildFireShutdown(void)
+{
+       close(addr2line_write_pipe[0]);
+       close(addr2line_read_pipe[0]);
+
+       FreeStrBuf(&FullBinaryName);
+}
+
 void WildFireInitBacktrace(const char *argvNull, int AddBaseFrameSkip)
 {