diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-27 18:56:39 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-27 18:56:39 +0000 |
commit | b819927d20fb5800d49fb184adac6fc3e2452b3d (patch) | |
tree | 53526b728fac3e8bedb27ee1ac2861ae8a35e82f | |
parent | 5b95018ec32fe6ef9545826ac6d5993633ae1695 (diff) |
changed timeout for hci_send_req
-rw-r--r-- | hcid/dbus-adapter.c | 14 | ||||
-rw-r--r-- | hcid/dbus.c | 18 |
2 files changed, 16 insertions, 16 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index b7425a1a..ab189ff6 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -225,7 +225,7 @@ int pending_remote_name_cancel(struct hci_dbus_data *pdata) dev = l->data; - if (hci_read_remote_name_cancel(dd, &dev->bdaddr, 100) < 0) { + if (hci_read_remote_name_cancel(dd, &dev->bdaddr, 1000) < 0) { error("Remote name cancel failed: %s(%d)", strerror(errno), errno); err = -errno; } @@ -482,7 +482,7 @@ static DBusHandlerResult handle_dev_set_mode_req(DBusConnection *conn, DBusMessa rq.rparam = &status; rq.rlen = sizeof(status); - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { int err = errno; error("Sending write scan enable command failed: %s (%d)", strerror(errno), errno); @@ -1718,7 +1718,7 @@ static DBusHandlerResult handle_dev_disconnect_remote_device_req(DBusConnection return error_no_such_adapter(conn, msg); /* Send the HCI disconnect command */ - if (hci_disconnect(dd, dev->handle, HCI_OE_USER_ENDED_CONNECTION, 100) < 0) { + if (hci_disconnect(dd, dev->handle, HCI_OE_USER_ENDED_CONNECTION, 500) < 0) { int err = errno; error("Disconnect failed"); hci_close_dev(dd); @@ -1877,7 +1877,7 @@ static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond, rq.rparam = &rp; rq.rlen = EVT_CMD_STATUS_SIZE; - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 500) < 0) { error("Unable to send HCI request: %s (%d)", strerror(errno), errno); error_failed(pdata->bonding->conn, pdata->bonding->rq, errno); @@ -2121,7 +2121,7 @@ static DBusHandlerResult handle_dev_remove_bonding_req(DBusConnection *conn, DBu if (l) { struct active_conn_info *con = l->data; /* Send the HCI disconnect command */ - if (hci_disconnect(dd, htobs(con->handle), HCI_OE_USER_ENDED_CONNECTION, 1000) < 0) { + if (hci_disconnect(dd, htobs(con->handle), HCI_OE_USER_ENDED_CONNECTION, 500) < 0) { int err = errno; error("Disconnect failed"); hci_close_dev(dd); @@ -2342,7 +2342,7 @@ static DBusHandlerResult handle_dev_start_periodic_req(DBusConnection *conn, DBu rq.rlen = sizeof(status); rq.event = EVT_CMD_COMPLETE; - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { int err = errno; error("Unable to start periodic inquiry: %s (%d)", strerror(errno), errno); @@ -2444,7 +2444,7 @@ static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, D rq.rlen = EVT_CMD_STATUS_SIZE; rq.event = EVT_CMD_STATUS; - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 500) < 0) { int err = errno; error("Unable to start inquiry: %s (%d)", strerror(errno), errno); diff --git a/hcid/dbus.c b/hcid/dbus.c index af9859d5..aa0a1f61 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -605,7 +605,7 @@ int hcid_dbus_start_device(uint16_t id) rq.rparam = &rp; rq.rlen = READ_SCAN_ENABLE_RP_SIZE; - if (hci_send_req(dd, &rq, 500) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending read scan enable command failed: %s (%d)", strerror(errno), errno); rp.enable = SCAN_PAGE | SCAN_INQUIRY; @@ -982,7 +982,7 @@ int disc_device_req_name(struct hci_dbus_data *dbus_data) baswap(&tmp, &dev->bdaddr); peer_addr = batostr(&tmp); - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 500) < 0) { error("Unable to send the HCI remote name request: %s (%d)", strerror(errno), errno); failed_signal = dev_signal_factory(dbus_data->dev_id, @@ -1929,7 +1929,7 @@ gboolean discoverable_timeout_handler(void *data) rq.rparam = &status; rq.rlen = sizeof(status); - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending write scan enable command to hci%d failed: %s (%d)", dbus_data->dev_id, strerror(errno), errno); goto failed; @@ -2069,7 +2069,7 @@ void hcid_dbus_setname_complete(bdaddr_t *local) rq.rparam = &rp; rq.rlen = READ_LOCAL_NAME_RP_SIZE; - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending getting name command failed: %s (%d)", strerror(errno), errno); rp.name[0] = '\0'; @@ -2138,7 +2138,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local) rq.rparam = &rp; rq.rlen = READ_SCAN_ENABLE_RP_SIZE; - if (hci_send_req(dd, &rq, 100) < 0) { + if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending read scan enable command failed: %s (%d)", strerror(errno), errno); goto failed; @@ -2386,13 +2386,13 @@ int cancel_discovery(struct hci_dbus_data *pdata) (cmp_func_t) disc_device_find); if (l) { dev = l->data; - if (remote_name_cancel(dd, &dev->bdaddr, 100) < 0) { + if (remote_name_cancel(dd, &dev->bdaddr, 1000) < 0) { error("Read remote name cancel failed: %s, (%d)", strerror(errno), errno); err = -errno; } } else { - if (inquiry_cancel(dd, 100) < 0) { + if (inquiry_cancel(dd, 1000) < 0) { error("Inquiry cancel failed:%s (%d)", strerror(errno), errno); err = -errno; @@ -2474,14 +2474,14 @@ int cancel_periodic_discovery(struct hci_dbus_data *pdata) l = slist_find(pdata->disc_devices, &match, (cmp_func_t) disc_device_find); if (l) { dev = l->data; - if (remote_name_cancel(dd, &dev->bdaddr, 100) < 0) { + if (remote_name_cancel(dd, &dev->bdaddr, 1000) < 0) { error("Read remote name cancel failed: %s, (%d)", strerror(errno), errno); err = -errno; } } /* ovewrite err if necessary: stop periodic inquiry has higher priority */ - if (periodic_inquiry_exit(dd, 100) < 0) { + if (periodic_inquiry_exit(dd, 1000) < 0) { error("Periodic Inquiry exit failed:%s (%d)", strerror(errno), errno); err = -errno; } |