summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 15:07:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-18 15:07:11 +0200
commit43fe926f20bd427e96a22081deace10752bb4533 (patch)
tree64a3a9950ad659ad3ff193df2916d05e31fa085c /src/Daemon
parent73c3f5fba688d9359dbf79f70b8759aee2857e41 (diff)
downloadabrt-43fe926f20bd427e96a22081deace10752bb4533.tar.gz
abrt-43fe926f20bd427e96a22081deace10752bb4533.tar.xz
abrt-43fe926f20bd427e96a22081deace10752bb4533.zip
abrt-applet: remove dbus-c++ glue. -50k of code
text data bss dec hex filename 70529 2144 1528 74201 121d9 abrt.t0/UNPACKED/usr/bin/abrt-applet 22116 1688 376 24180 5e74 abrt.t1/UNPACKED/usr/bin/abrt-applet Also, we do not use dbus-c++ anymore, which is 200k of code Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index 08cd3d5e..f710fd9f 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -430,7 +430,7 @@ static int handle_SetSettings(DBusMessage* call, DBusMessage* reply)
*/
/* Callback: "a message is received to a registered object path" */
-static DBusHandlerResult message_received(DBusConnection *conn, DBusMessage *msg, void* data)
+static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg, void* data)
{
const char* member = dbus_message_get_member(msg);
log("%s(method:'%s')", __func__, member);
@@ -499,7 +499,7 @@ static void handle_dbus_err(bool error_flag, DBusError *err)
if (!error_flag)
return;
error_msg_and_die(
- "error requesting DBus name %s, possible reasons: "
+ "Error requesting DBus name %s, possible reasons: "
"abrt run by non-root; dbus config is incorrect",
CC_DBUS_NAME);
}
@@ -511,13 +511,14 @@ CCommLayerServerDBus::CCommLayerServerDBus()
dbus_error_init(&err);
VERB3 log("dbus_bus_get");
- g_dbus_conn = conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
+ conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
handle_dbus_err(conn == NULL, &err);
attach_dbus_conn_to_glib_main_loop(conn, "/com/redhat/abrt", message_received);
VERB3 log("dbus_bus_request_name");
int rc = dbus_bus_request_name(conn, CC_DBUS_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING, &err);
+//maybe check that r == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER instead?
handle_dbus_err(rc < 0, &err);
VERB3 log("dbus init done");
}