OSDN Git Service

adapter: fix setting of discoverable timeout
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 11 Jun 2013 10:56:19 +0000 (11:56 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 17 Jun 2013 08:47:49 +0000 (11:47 +0300)
The mgmt_cp_set_discoverable struct was getting reset for no reason after
we set up the discoverable timeout value.

src/adapter.c

index 52d2fc7..02c4f33 100644 (file)
@@ -1907,9 +1907,6 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
                goto failed;
        }
 
-       memset(&cp, 0, sizeof(cp));
-       cp.val = (enable == TRUE) ? 0x01 : 0x00;
-
        DBG("sending %s command for index %u", mgmt_opstr(opcode),
                                                        adapter->dev_id);