summaryrefslogtreecommitdiffstats
path: root/src/adapter.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-24 15:49:52 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-24 15:49:52 +0300
commita5883ecb1aa94b09bcf0e7ce4184d262027c5939 (patch)
tree80ce381543b85d61ea54f930a25d08ebabc1291c /src/adapter.c
parentfffc600099fdd44e485fa4925a599d790424f881 (diff)
Use g_dbus_send_message instead of dbus_connection_send
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/adapter.c b/src/adapter.c
index bf65acea..f1f4222c 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -762,14 +762,12 @@ static void confirm_mode_cb(struct agent *agent, DBusError *err, void *data)
if (err && dbus_error_is_set(err)) {
reply = dbus_message_new_error(req->msg, err->name, err->message);
- dbus_connection_send(req->conn, reply, NULL);
- dbus_message_unref(reply);
+ g_dbus_send_message(req->conn, reply);
goto cleanup;
}
reply = set_mode(req->conn, req->msg, req->mode, req->adapter);
- dbus_connection_send(req->conn, reply, NULL);
- dbus_message_unref(reply);
+ g_dbus_send_message(req->conn, reply);
if (!find_session(req->adapter->mode_sessions, req->msg))
goto cleanup;
@@ -923,10 +921,8 @@ static void reply_authentication_failure(struct bonding_request_info *bonding)
bonding->hci_status : HCI_AUTHENTICATION_FAILURE;
reply = new_authentication_return(bonding->msg, status);
- if (reply) {
- dbus_connection_send(bonding->conn, reply, NULL);
- dbus_message_unref(reply);
- }
+ if (reply)
+ g_dbus_send_message(bonding->conn, reply);
}
struct btd_device *adapter_find_device(struct btd_adapter *adapter, const char *dest)