diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 14:13:53 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 14:13:53 +0200 |
| commit | 8c0d6a2a3eb9ed0f31e9dbd4ff1c18929932b982 (patch) | |
| tree | 010709b30117a40e62ad888692b57177a921bd2e /src/Daemon/Daemon.cpp | |
| parent | 1dbb6423000e2fcd3fe9a1b6ddbf6200d522d470 (diff) | |
| download | abrt-8c0d6a2a3eb9ed0f31e9dbd4ff1c18929932b982.tar.gz abrt-8c0d6a2a3eb9ed0f31e9dbd4ff1c18929932b982.tar.xz abrt-8c0d6a2a3eb9ed0f31e9dbd4ff1c18929932b982.zip | |
eliminate global variable g_cw
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/Daemon.cpp')
| -rw-r--r-- | src/Daemon/Daemon.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 7821f0f..a7252ac 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -49,7 +49,6 @@ typedef struct cron_callback_data_t static uint8_t sig_caught; /* = 0 */ static GMainLoop* g_pMainloop; -CCrashWatcher *g_cw; CCommLayerServer *g_pCommLayer; /* * Map to cache the results from CreateReport_t @@ -324,7 +323,7 @@ static void FindNewDumps(const std::string& pPath) case MW_GPG_ERROR: case MW_FILE_ERROR: default: - g_cw->Warning("Corrupted, bad or already saved crash, deleting."); + warn_client("Corrupted, bad or already saved crash, deleting."); DeleteDebugDumpDir(*itt); break; } @@ -335,7 +334,7 @@ static void FindNewDumps(const std::string& pPath) { throw e; } - g_cw->Warning(e.what()); + warn_client(e.what()); } } } @@ -431,7 +430,7 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe err = g_io_channel_read(gio, buf, INOTIFY_BUFF_SIZE, &len); if (err != G_IO_ERROR_NONE) { - g_cw->Warning("Error reading inotify fd."); + warn_client("Error reading inotify fd."); delete[] buf; return FALSE; } @@ -469,8 +468,8 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe break; case MW_REPORTED: case MW_OCCURED: - /* send message to dbus */ 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); break; @@ -481,14 +480,14 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe case MW_IN_DB: case MW_FILE_ERROR: default: - g_cw->Warning("Corrupted or bad crash, deleting..."); + warn_client("Corrupted or bad crash, deleting..."); DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name); break; } } catch (CABRTException& e) { - g_cw->Warning(e.what()); + warn_client(e.what()); if (e.type() == EXCEP_FATAL) { delete[] buf; |
