diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-06-06 13:10:31 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-06-06 13:10:31 +0000 |
commit | 5a2610e2ba6c5881b71a931623a56480670fbed8 (patch) | |
tree | cc55a0781d63fd1c5170122e44343b68ab9c79a7 /audio/manager.c | |
parent | f425717dc531dc8f44e8b77981dbb9bfb54e34aa (diff) |
Fix use of DBUS_HANDLER_RESULT_HANDLED.
Diffstat (limited to 'audio/manager.c')
-rw-r--r-- | audio/manager.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/audio/manager.c b/audio/manager.c index 75c44440..ec9b203e 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -434,19 +434,22 @@ static void get_records_cb(sdp_list_t *recs, int err, gpointer user_data) static DBusMessage *get_records(uuid_t *uuid, struct audio_sdp_data *data) { struct audio_device *device = data->device; + DBusMessage *reply = NULL; int err; err = bt_search_service(&device->src, &device->dst, uuid, get_records_cb, data, NULL); if (!err) - return DBUS_HANDLER_RESULT_HANDLED; + return NULL; if (data->msg) - error_connection_attempt_failed(connection, data->msg, -err); + reply = g_dbus_create_error(data->msg, + ERROR_INTERFACE ".ConnectionAttemptFailed", + strerror(-err)); finish_sdp(data, FALSE); - return DBUS_HANDLER_RESULT_HANDLED; + return reply; } static DBusMessage *resolve_services(DBusMessage *msg, @@ -577,18 +580,11 @@ static DBusMessage *am_create_device(DBusConnection *conn, bdaddr_t bda; struct audio_device *device; DBusMessage *reply; - DBusError derr; - dbus_error_init(&derr); - dbus_message_get_args(msg, &derr, + if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &address, - DBUS_TYPE_INVALID); - - if (dbus_error_is_set(&derr)) { - error_invalid_arguments(connection, msg, derr.message); - dbus_error_free(&derr); - return DBUS_HANDLER_RESULT_HANDLED; - } + DBUS_TYPE_INVALID)) + return NULL; str2ba(address, &bda); |