summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-03-16 18:39:26 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-03-16 18:39:26 +0100
commitdf0e1c81365aaa5cf76506e859d5e3ad1181654f (patch)
tree827a36b259f61f8ff23c422f30e7f762ffb25146 /src/daemon
parent84311982e3c0955851ff1590b72b446bd929dbdf (diff)
downloadabrt-df0e1c81365aaa5cf76506e859d5e3ad1181654f.zip
abrt-df0e1c81365aaa5cf76506e859d5e3ad1181654f.tar.gz
abrt-df0e1c81365aaa5cf76506e859d5e3ad1181654f.tar.xz
abrtd: heed glib warning about hash table being NULL
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/Daemon.cpp13
-rw-r--r--src/daemon/MiddleWare.cpp2
-rw-r--r--src/daemon/abrt-action-save-package-data.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index 5555138..7e19bca 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;
}
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index 6ee0d0c..a226194 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -551,7 +551,7 @@ mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data)
res = MW_OK;
if (count > 1)
{
- log("Crash dump is a duplicate of %s", dump_dir_name);
+ log("Dump directory is a duplicate of %s", dump_dir_name);
res = MW_OCCURRED;
}
}
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
index 76f4724..0416cde 100644
--- a/src/daemon/abrt-action-save-package-data.c
+++ b/src/daemon/abrt-action-save-package-data.c
@@ -261,10 +261,10 @@ int main(int argc, char **argv)
unsigned opts = parse_opts(argc, argv, program_options, program_usage_string);
putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose));
- msg_prefix = PROGNAME;
+ //msg_prefix = PROGNAME;
if (opts & OPT_s)
{
- openlog(msg_prefix, 0, LOG_DAEMON);
+ openlog(PROGNAME, 0, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
}