Skip to content

Commit

Permalink
Bluetooth: Fix clearing discovery type when stopping discovery
Browse files Browse the repository at this point in the history
This patch prevents resetting of discovery type while stopping
discovery, since otherwise the wrong type might be send in case of
discovery failure. It also doesn't matter that we are "lazy" with
updating the type since it is anyway reset when starting discovery again
and it's not needed to know the current discovery state.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Hemant Gupta authored and Gustavo Padovan committed May 9, 2012
1 parent 0ed0914 commit b24c624
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
case DISCOVERY_STOPPED:
if (hdev->discovery.state != DISCOVERY_STARTING)
mgmt_discovering(hdev, 0);
hdev->discovery.type = 0;
break;
case DISCOVERY_STARTING:
break;
Expand Down

0 comments on commit b24c624

Please sign in to comment.