summaryrefslogtreecommitdiffstats
path: root/src/daemon/Daemon.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-03-16 18:38:43 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2011-03-16 18:38:43 +0100
commitb70e9e81f83fa818ea383cd17ca17b8a1bcae95a (patch)
treef6b592713719adc76307fd9e3c7a045d74f3454d /src/daemon/Daemon.cpp
parentf2eb598528083144cd651205a674e9aa0ce89832 (diff)
parentdf0e1c81365aaa5cf76506e859d5e3ad1181654f (diff)
downloadabrt-b70e9e81f83fa818ea383cd17ca17b8a1bcae95a.tar.gz
abrt-b70e9e81f83fa818ea383cd17ca17b8a1bcae95a.tar.xz
abrt-b70e9e81f83fa818ea383cd17ca17b8a1bcae95a.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/daemon/Daemon.cpp')
-rw-r--r--src/daemon/Daemon.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index 5555138c..7e19bcaf 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -382,18 +382,18 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
crash_data_t *crash_data = NULL;
fullname = concat_path_file(DEBUG_DUMPS_DIR, name);
mw_result_t res = LoadDebugDump(fullname, &crash_data);
- const char *first = get_crash_item_content_or_NULL(crash_data, CD_DUMPDIR);
+ const char *first = crash_data ? get_crash_item_content_or_NULL(crash_data, CD_DUMPDIR) : NULL;
switch (res)
{
case MW_OK:
- log("New crash %s, processing", fullname);
+ log("New dump directory %s, processing", fullname);
/* Fall through */
case MW_OCCURRED: /* dup */
{
if (res != MW_OK)
{
- log("Deleting crash %s (dup of %s), sending dbus signal",
+ log("Deleting dump directory %s (dup of %s), sending dbus signal",
strrchr(fullname, '/') + 1,
strrchr(first, '/') + 1);
delete_dump_dir(fullname);
@@ -408,8 +408,9 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
get_crash_item_content_or_NULL(crash_data, FILENAME_UID),
get_crash_item_content_or_NULL(crash_data, FILENAME_UUID)
);
- /* when dupe occurs we need to return first occure not the one which
- * is deleted */
+ /* When dup occurs we need to return first occurence,
+ * not the one which is deleted
+ */
send_dbus_sig_Crash(get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE),
crash_id, //TODO: stop passing this param, it is unused
(first)? first: fullname,
@@ -421,7 +422,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
case MW_CORRUPTED:
case MW_GPG_ERROR:
default:
- log("Corrupted or bad crash %s (res:%d), deleting", fullname, (int)res);
+ log("Corrupted or bad dump %s (res:%d), deleting", fullname, (int)res);
delete_dump_dir(fullname);
break;
}