summaryrefslogtreecommitdiffstats
path: root/src/Daemon/CommLayerServerDBus.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-11-06 15:11:55 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-11-06 15:11:55 +0100
commit3a62ede25114452938acb8e1a67006633b139efc (patch)
treed3a291e5dac5d7ddf14bae4a097ff5b298b71aa5 /src/Daemon/CommLayerServerDBus.cpp
parentfc571a9ac7aaa8802d3e8aacf9aefac12ca3c81c (diff)
parent80975b02ec1a2e8dfc6f7ce21e47cf71b16b5a6e (diff)
downloadabrt-3a62ede25114452938acb8e1a67006633b139efc.tar.gz
abrt-3a62ede25114452938acb8e1a67006633b139efc.tar.xz
abrt-3a62ede25114452938acb8e1a67006633b139efc.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/Daemon/CommLayerServerDBus.cpp')
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index 2483942..925844e 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -46,16 +46,24 @@ static void send_flush_and_unref(DBusMessage* msg)
}
/* Notify the clients (UI) about a new crash */
-void CCommLayerServerDBus::Crash(const std::string& progname, const std::string& uid)
+void CCommLayerServerDBus::Crash(const char *progname, const char *uid_str)
{
DBusMessage* msg = new_signal_msg("Crash");
- const char* c_progname = progname.c_str();
- const char* c_uid = uid.c_str();
- dbus_message_append_args(msg,
- DBUS_TYPE_STRING, &c_progname,
- DBUS_TYPE_STRING, &c_uid,
- DBUS_TYPE_INVALID);
- VERB2 log("Sending signal Crash('%s','%s')", c_progname, c_uid);
+ if (uid_str)
+ {
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &progname,
+ DBUS_TYPE_STRING, &uid_str,
+ DBUS_TYPE_INVALID);
+ VERB2 log("Sending signal Crash('%s','%s')", progname, uid_str);
+ }
+ else
+ {
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &progname,
+ DBUS_TYPE_INVALID);
+ VERB2 log("Sending signal Crash('%s')", progname);
+ }
send_flush_and_unref(msg);
}
@@ -127,7 +135,7 @@ static long get_remote_uid(DBusMessage* call, const char** ppSender = NULL)
static int handle_GetCrashInfos(DBusMessage* call, DBusMessage* reply)
{
long unix_uid = get_remote_uid(call);
- vector_crash_infos_t argout1 = GetCrashInfos(to_string(unix_uid));
+ vector_crash_infos_t argout1 = GetCrashInfos(to_string(unix_uid).c_str());
DBusMessageIter iter;
dbus_message_iter_init_append(reply, &iter);
@@ -273,7 +281,7 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
report_status_t argout1;
try
{
- argout1 = Report(argin1, user_conf_data, to_string(unix_uid));
+ argout1 = Report(argin1, user_conf_data, to_string(unix_uid).c_str());
}
catch (CABRTException &e)
{
@@ -307,7 +315,7 @@ static int handle_DeleteDebugDump(DBusMessage* call, DBusMessage* reply)
}
long unix_uid = get_remote_uid(call);
- bool argout1 = DeleteDebugDump(argin1, to_string(unix_uid));
+ bool argout1 = DeleteDebugDump(argin1, to_string(unix_uid).c_str());
dbus_message_append_args(reply,
DBUS_TYPE_BOOLEAN, &argout1,