Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291034
b: refs/heads/master
c: 955638e
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Feb 23, 2012
1 parent c88c39d commit 4c0c705
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24c54a90527ca5b85e7feedde2c779dc056ffddb
refs/heads/master: 955638ecec9431788e291fc99f34c42124071abe
11 changes: 11 additions & 0 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,17 @@ static int set_discoverable(struct sock *sk, u16 index, void *data, u16 len)
}

if (!!cp->val == test_bit(HCI_DISCOVERABLE, &hdev->dev_flags)) {
if (hdev->discov_timeout > 0) {
cancel_delayed_work(&hdev->discov_off);
hdev->discov_timeout = 0;
}

if (cp->val && timeout > 0) {
hdev->discov_timeout = timeout;
queue_delayed_work(hdev->workqueue, &hdev->discov_off,
msecs_to_jiffies(hdev->discov_timeout * 1000));
}

err = send_settings_rsp(sk, MGMT_OP_SET_DISCOVERABLE, hdev);
goto failed;
}
Expand Down

0 comments on commit 4c0c705

Please sign in to comment.