diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-19 17:52:30 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-09-19 17:52:30 +0000 |
commit | c7152fbc6dd127035cc22e1abe996b9e2853c9ac (patch) | |
tree | 4a74a482a50adfeb08726bbd250d1908777a7996 /hcid/dbus-adapter.c | |
parent | 420ad4437afc127331e029c63df8e9e9d572d9b6 (diff) |
cleanup:lap and command complete event
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r-- | hcid/dbus-adapter.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index b938df9f..97330dc5 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -2399,7 +2399,7 @@ static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, D evt_cmd_status rp; struct hci_request rq; struct hci_dbus_data *dbus_data = data; - uint32_t lap = 0x9e8b33; + uint8_t lap[3] = { 0x33, 0x8b, 0x9e }; int dd; if (!dbus_data->up) @@ -2421,9 +2421,7 @@ static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, D return error_no_such_adapter(conn, msg); memset(&cp, 0, sizeof(cp)); - cp.lap[0] = lap & 0xff; - cp.lap[1] = (lap >> 8) & 0xff; - cp.lap[2] = (lap >> 16) & 0xff; + memcpy(&cp.lap, lap, 3); cp.length = 0x08; cp.num_rsp = 0x00; @@ -2490,7 +2488,7 @@ static DBusHandlerResult handle_dev_cancel_discovery_req(DBusConnection *conn, D /* only the discover requestor can cancel the inquiry process */ if (!dbus_data->discovery_requestor || - strcmp(dbus_data->discovery_requestor, dbus_message_get_sender(msg))) + strcmp(dbus_data->discovery_requestor, dbus_message_get_sender(msg))) return error_not_authorized(conn, msg); /* * Cleanup the discovered devices list and send the cmd |