diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-10-26 11:46:43 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-10-26 11:46:43 +0000 |
commit | e95333e133a20f3979c0e36cedbcd78f642f3d4e (patch) | |
tree | d4394117c4375e55e3ff8967cab2f6714e92652a /hcid/dbus-manager.c | |
parent | e730e5fce1bfc9096b8351834ad8e76fe9d987c2 (diff) |
Store the service agent data in the D-Bus path data
Diffstat (limited to 'hcid/dbus-manager.c')
-rw-r--r-- | hcid/dbus-manager.c | 7 |
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); |