Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291012
b: refs/heads/master
c: ed9b5f2
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 21, 2012
1 parent 43d421f commit 7caef41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a297e97cf7228467a8c5c76216945ccf029ae2a4
refs/heads/master: ed9b5f2fa053adce8dac88a385d2225a8ac5f0b5
11 changes: 6 additions & 5 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2965,8 +2965,6 @@ int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
bool changed = false;
int err = 0;

mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, hdev, settings_rsp, &match);

if (discoverable) {
if (!test_and_set_bit(HCI_DISCOVERABLE, &hdev->dev_flags))
changed = true;
Expand All @@ -2975,6 +2973,9 @@ int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
changed = true;
}

mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, hdev, settings_rsp,
&match);

if (changed)
err = new_settings(hdev, match.sk);

Expand All @@ -2990,9 +2991,6 @@ int mgmt_connectable(struct hci_dev *hdev, u8 connectable)
bool changed = false;
int err = 0;

mgmt_pending_foreach(MGMT_OP_SET_CONNECTABLE, hdev, settings_rsp,
&match);

if (connectable) {
if (!test_and_set_bit(HCI_CONNECTABLE, &hdev->dev_flags))
changed = true;
Expand All @@ -3001,6 +2999,9 @@ int mgmt_connectable(struct hci_dev *hdev, u8 connectable)
changed = true;
}

mgmt_pending_foreach(MGMT_OP_SET_CONNECTABLE, hdev, settings_rsp,
&match);

if (changed)
err = new_settings(hdev, match.sk);

Expand Down

0 comments on commit 7caef41

Please sign in to comment.