summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-manager.c')
-rw-r--r--hcid/dbus-manager.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c
index 0d3e8a1a..d8c34348 100644
--- a/hcid/dbus-manager.c
+++ b/hcid/dbus-manager.c
@@ -194,6 +194,7 @@ static DBusHandlerResult list_services(DBusConnection *conn,
DBusMessage *msg, void *data)
{
DBusMessage *reply;
+ DBusMessageIter iter;
if (!dbus_message_has_signature(msg, DBUS_TYPE_INVALID_AS_STRING))
return error_invalid_arguments(conn, msg);
@@ -202,7 +203,8 @@ static DBusHandlerResult list_services(DBusConnection *conn,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- append_available_services(msg);
+ dbus_message_iter_init_append(reply, &iter);
+ append_available_services(&iter);
return send_message_and_unref(conn, reply);
}
@@ -294,6 +296,9 @@ DBusHandlerResult msg_func_manager(DBusConnection *conn,
path = dbus_message_get_path(msg);
name = dbus_message_get_member(msg);
+ if ((strcmp(BASE_PATH, path)) && !strcmp(iface, "org.bluez.ServiceAgent"))
+ return error_unknown_method(conn, msg);
+
if (strcmp(BASE_PATH, path))
return error_no_such_adapter(conn, msg);