diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-16 11:11:34 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-16 11:11:34 +0000 |
commit | dbe296466fa911e0122194870eb5c7cd89edd5ee (patch) | |
tree | a87508734591b90e93ca05f1006186a7cd35862d /hcid | |
parent | 8af0823c55376fb62a8207e361ee49357781d4a1 (diff) |
Fix GetConnectionName crash
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-service.c | 6 |
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); |