summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-service.c')
-rw-r--r--hcid/dbus-service.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 4f935ff5..e060938e 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -252,13 +252,17 @@ static DBusHandlerResult get_connection_name(DBusConnection *conn,
{
struct service *service = data;
DBusMessage *reply;
+ const char *bus_name;
reply = dbus_message_new_method_return(msg);
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ if (service->bus_name)
+ bus_name = service->bus_name;
+
dbus_message_append_args(reply,
- DBUS_TYPE_STRING, &service->bus_name,
+ DBUS_TYPE_STRING, &bus_name,
DBUS_TYPE_INVALID);
return send_message_and_unref(conn, reply);