From 833a88bb5e6c852c378fdd66703e02b4e02a0d6a Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 27 Sep 2006 19:17:16 +0000 Subject: missing set expected return event for hci_send_req --- hcid/dbus-adapter.c | 3 ++- hcid/dbus.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index ab189ff6..8ceda6ed 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -481,6 +481,7 @@ static DBusHandlerResult handle_dev_set_mode_req(DBusConnection *conn, DBusMessa rq.clen = sizeof(hci_mode); rq.rparam = &status; rq.rlen = sizeof(status); + rq.event = EVT_CMD_COMPLETE; if (hci_send_req(dd, &rq, 1000) < 0) { int err = errno; @@ -1871,11 +1872,11 @@ static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond, memset(&rq, 0, sizeof(rq)); rq.ogf = OGF_LINK_CTL; rq.ocf = OCF_AUTH_REQUESTED; - rq.event = EVT_CMD_STATUS; rq.cparam = &cp; rq.clen = AUTH_REQUESTED_CP_SIZE; rq.rparam = &rp; rq.rlen = EVT_CMD_STATUS_SIZE; + rq.event = EVT_CMD_STATUS; if (hci_send_req(dd, &rq, 500) < 0) { error("Unable to send HCI request: %s (%d)", diff --git a/hcid/dbus.c b/hcid/dbus.c index aa0a1f61..6cf4182b 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -604,6 +604,7 @@ int hcid_dbus_start_device(uint16_t id) rq.ocf = OCF_READ_SCAN_ENABLE; rq.rparam = &rp; rq.rlen = READ_SCAN_ENABLE_RP_SIZE; + rq.event = EVT_CMD_COMPLETE; if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending read scan enable command failed: %s (%d)", @@ -1928,6 +1929,7 @@ gboolean discoverable_timeout_handler(void *data) rq.clen = sizeof(hci_mode); rq.rparam = &status; rq.rlen = sizeof(status); + rq.event = EVT_CMD_COMPLETE; if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending write scan enable command to hci%d failed: %s (%d)", @@ -2068,6 +2070,7 @@ void hcid_dbus_setname_complete(bdaddr_t *local) rq.ocf = OCF_READ_LOCAL_NAME; rq.rparam = &rp; rq.rlen = READ_LOCAL_NAME_RP_SIZE; + rq.event = EVT_CMD_COMPLETE; if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending getting name command failed: %s (%d)", @@ -2137,6 +2140,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local) rq.ocf = OCF_READ_SCAN_ENABLE; rq.rparam = &rp; rq.rlen = READ_SCAN_ENABLE_RP_SIZE; + rq.event = EVT_CMD_COMPLETE; if (hci_send_req(dd, &rq, 1000) < 0) { error("Sending read scan enable command failed: %s (%d)", -- cgit