summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-27 14:05:37 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-27 14:05:37 +0000
commit1152fc72d35de616d5d2d3a29525fd6aacb852f9 (patch)
treeb2ee6eaa770d1cf6b0d5901ae0da5138223d35f7
parentf9ba262724b4605bf45d0a1fd2c87eeeac714917 (diff)
Remove blocking call of FinishRemoteServiceTransaction.
-rw-r--r--audio/device.c19
-rw-r--r--input/manager.c18
2 files changed, 4 insertions, 33 deletions
diff --git a/audio/device.c b/audio/device.c
index 2f5bf417..7510d9a4 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -380,8 +380,7 @@ int device_remove_stored(struct device *dev)
void device_finish_sdp_transaction(struct device *dev)
{
char address[18], *addr_ptr = address;
- DBusMessage *msg, *reply;
- DBusError derr;
+ DBusMessage *msg;
ba2str(&dev->dst, address);
@@ -396,21 +395,7 @@ void device_finish_sdp_transaction(struct device *dev)
dbus_message_append_args(msg, DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
- dbus_error_init(&derr);
- reply = dbus_connection_send_with_reply_and_block(dev->conn,
- msg, -1, &derr);
-
- dbus_message_unref(msg);
-
- if (dbus_error_is_set(&derr) ||
- dbus_set_error_from_message(&derr, reply)) {
- error("FinishRemoteServiceTransaction(%s) failed: %s",
- address, derr.message);
- dbus_error_free(&derr);
- return;
- }
-
- dbus_message_unref(reply);
+ send_message_and_unref(dev->conn, msg);
}
#if 0
diff --git a/input/manager.c b/input/manager.c
index 953b44ac..2e138c6b 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -452,8 +452,7 @@ static void create_bonding_reply(DBusPendingCall *call, void *data)
static void finish_sdp_transaction(bdaddr_t *dba)
{
char address[18], *addr_ptr = address;
- DBusMessage *msg, *reply;
- DBusError derr;
+ DBusMessage *msg;
ba2str(dba, address);
@@ -468,20 +467,7 @@ static void finish_sdp_transaction(bdaddr_t *dba)
dbus_message_append_args(msg, DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
- dbus_error_init(&derr);
- reply = dbus_connection_send_with_reply_and_block(connection, msg,
- -1, &derr);
-
- dbus_message_unref(msg);
-
- if (dbus_error_is_set(&derr) || dbus_set_error_from_message(&derr, reply)) {
- error("FinishRemoteServiceTransaction(%s) failed: %s",
- address, derr.message);
- dbus_error_free(&derr);
- return;
- }
-
- dbus_message_unref(reply);
+ send_message_and_unref(connection, msg);
}
static int create_bonding(struct pending_req *pr)