summaryrefslogtreecommitdiffstats
path: root/hcid/adapter.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-03 15:01:00 -0300
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 10:32:38 -0300
commitd3ea4d9816ddbc3ee0ea6ad44cd130cb646a3a61 (patch)
tree2da740983cde17b874ef5bd9914e253f9e3ac983 /hcid/adapter.c
parentd98c43ee61b7b0f7009cad6b87ccbe13252085e0 (diff)
Remove pending disconnect from adapter.c.
Diffstat (limited to 'hcid/adapter.c')
-rw-r--r--hcid/adapter.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index 7e6b0cce..6a7a1700 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -598,53 +598,6 @@ done:
return dbus_message_new_method_return(msg);
}
-gboolean dc_pending_timeout_handler(void *data)
-{
- int dd;
- struct adapter *adapter = data;
- struct pending_dc_info *pending_dc = adapter->pending_dc;
- DBusMessage *reply;
-
- dd = hci_open_dev(adapter->dev_id);
-
- if (dd < 0) {
- error_no_such_adapter(pending_dc->conn,
- pending_dc->msg);
- dc_pending_timeout_cleanup(adapter);
- return FALSE;
- }
-
- /* Send the HCI disconnect command */
- if (hci_disconnect(dd, htobs(pending_dc->conn_handle),
- HCI_OE_USER_ENDED_CONNECTION,
- 500) < 0) {
- int err = errno;
- error("Disconnect failed");
- error_failed_errno(pending_dc->conn, pending_dc->msg, err);
- } else {
- reply = dbus_message_new_method_return(pending_dc->msg);
- if (reply) {
- dbus_connection_send(pending_dc->conn, reply, NULL);
- dbus_message_unref(reply);
- } else
- error("Failed to allocate disconnect reply");
- }
-
- hci_close_dev(dd);
- dc_pending_timeout_cleanup(adapter);
-
- return FALSE;
-}
-
-void dc_pending_timeout_cleanup(struct adapter *adapter)
-{
- dbus_connection_unref(adapter->pending_dc->conn);
- dbus_message_unref(adapter->pending_dc->msg);
- g_free(adapter->pending_dc);
- adapter->pending_dc = NULL;
-}
-
-
static void reply_authentication_failure(struct bonding_request_info *bonding)
{
DBusMessage *reply;