summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-26 23:04:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-26 23:04:42 +0000
commit99d88e0170feac699d4738362afdaaba88015629 (patch)
treeb284818f7cf072176797db63ceed89b428314e86
parent4a8c316dee19fa86010139abc0b29829599a5133 (diff)
Altered so that if running in -debug mode, will not erase its .so files from /tmp to allow a clean backtrace
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2928 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/dynamic.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dynamic.cpp b/src/dynamic.cpp
index e96c9d905..06aaf3ccd 100644
--- a/src/dynamic.cpp
+++ b/src/dynamic.cpp
@@ -17,6 +17,7 @@
using namespace std;
#include "inspircd_config.h"
+#include "inspircd_io.h"
#include "globals.h"
#include "dynamic.h"
@@ -32,6 +33,8 @@ using namespace std;
#include <sys/types.h>
#include <stdio.h>
+extern ServerConfig* Config;
+
DLLManager::DLLManager(char *fname)
{
#ifdef STATIC_LINK
@@ -72,7 +75,8 @@ DLLManager::DLLManager(char *fname)
err = (char*)dlerror();
close(fd);
// We can delete the tempfile once it's loaded, leaving just the inode.
- unlink(tmpfile_template);
+ if (!Config->debugging)
+ unlink(tmpfile_template);
#endif
}