From 7f10181be367d77e5f3203e938ab24cf722119df Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Thu, 29 Oct 2009 15:20:56 +0100 Subject: Normal user can see kerneloops and report it Bugzilla memory leaks fix --- src/Daemon/Daemon.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/Daemon/Daemon.cpp') diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index d1ab188e..a6a4f93c 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #if HAVE_CONFIG_H #include #endif @@ -555,14 +556,34 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe log("New crash, saving..."); RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]); /* Send dbus signal */ - g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops") + { + // When Kerneloops comes it will be sent uid with -1 + // Applet will detected and show normal user + std::cout << "New: package|kerneloops" << crashinfo[CD_PACKAGE][CD_CONTENT] << std::endl; + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string(UINT_MAX)); + } + else + { + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + } break; case MW_REPORTED: case MW_OCCURED: log("Already saved crash, deleting..."); /* Send dbus signal */ - g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); - DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name); + if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops") + { + // When Kerneloops comes it will be sent uid with -1 + // Applet will detected and show normal user + std::cout << "New: package|kerneloops" << crashinfo[CD_PACKAGE][CD_CONTENT] << std::endl; + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string(UINT_MAX)); + } + else + { + g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]); + } + //DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name); break; case MW_BLACKLISTED: case MW_CORRUPTED: -- cgit