diff options
Diffstat (limited to 'net-analyzer/mwcollect/files/mwcollect-3.0.1-modules.patch')
-rw-r--r-- | net-analyzer/mwcollect/files/mwcollect-3.0.1-modules.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/net-analyzer/mwcollect/files/mwcollect-3.0.1-modules.patch b/net-analyzer/mwcollect/files/mwcollect-3.0.1-modules.patch new file mode 100644 index 000000000000..0edb8fecf20e --- /dev/null +++ b/net-analyzer/mwcollect/files/mwcollect-3.0.1-modules.patch @@ -0,0 +1,59 @@ +Index: mwcollect3/trunk/src/core/mwcollect.cpp
+===================================================================
+--- mwcollect3/trunk/src/core/mwcollect.cpp (revision 250)
++++ mwcollect3/trunk/src/core/mwcollect.cpp (revision 251)
+@@ -246,4 +246,14 @@
+ }
+
++ if(!pCollector->start())
++ {
++ g_pLogManager->log(LT_LEVEL_CRITICAL | LT_STATUS, "Startup failed, aborting!");
++
++ delete pCollector;
++ delete g_pLogManager;
++
++ return -1;
++ }
++
+ if(szChuid)
+ { // needs to be done before chrooting
+@@ -285,4 +295,5 @@
+ if(szChuid)
+ {
++ DEBUG("Changing UID to %s (%i) %s setting capabilties.", szChuid, (int) uid, bCaps ? "with" : "without");
+
+ #ifdef LINUX_FLAVOURED
+@@ -313,14 +324,4 @@
+ }
+
+- if(!pCollector->start())
+- {
+- g_pLogManager->log(LT_LEVEL_CRITICAL | LT_STATUS, "Startup failed, aborting!");
+-
+- delete pCollector;
+- delete g_pLogManager;
+-
+- return -1;
+- }
+-
+ if(bDaemon && (pid = fork()))
+ {
+Index: mwcollect3/trunk/src/log-file/log-file.cpp
+===================================================================
+--- mwcollect3/trunk/src/log-file/log-file.cpp (revision 134)
++++ mwcollect3/trunk/src/log-file/log-file.cpp (revision 251)
+@@ -7,4 +7,7 @@
+
+ #include "log-file.h"
++
++#include <errno.h>
++#include <string.h>
+
+
+@@ -41,5 +44,5 @@
+ if(!(pFile = fopen(szFileName, "at")))
+ {
+- LOG(LT_LEVEL_CRITICAL | LT_STATUS, "Could not open logfile \"%s\" for writing!", szFileName);
++ LOG(LT_LEVEL_CRITICAL | LT_STATUS, "Could not open logfile \"%s\" for writing: %s!", szFileName, strerror(errno));
+ return false;
+ }
|