some more work on plugin manager
[enigma2.git] / lib / base / eerror.cpp
index 1e4d348fa4ee4ba034702727c7fb3e1c1aed041d..35e46e05d4199d38190202573e48c601e7f509fa 100644 (file)
@@ -1,8 +1,9 @@
 #include <lib/base/eerror.h>
 #include <lib/base/elock.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <unistd.h>
 
 #include <string>
@@ -77,7 +78,7 @@ int logOutputConsole=1;
 static pthread_mutex_t DebugLock =
        PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
 
-extern void bsodFatal();
+extern void bsodFatal(const char *component);
 
 void eFatal(const char* fmt, ...)
 {
@@ -86,10 +87,12 @@ void eFatal(const char* fmt, ...)
        va_start(ap, fmt);
        vsnprintf(buf, 1024, fmt, ap);
        va_end(ap);
-       singleLock s(DebugLock);
-       logOutput(lvlFatal, "FATAL: " + std::string(buf) + "\n");
-       fprintf(stderr, "FATAL: %s\n",buf );
-       bsodFatal();
+       {
+               singleLock s(DebugLock);
+               logOutput(lvlFatal, "FATAL: " + std::string(buf) + "\n");
+               fprintf(stderr, "FATAL: %s\n",buf );
+       }
+       bsodFatal("enigma2");
 }
 
 #ifdef DEBUG