Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b24c6247 authored by Hemant Gupta's avatar Hemant Gupta Committed by Gustavo Padovan
Browse files

Bluetooth: Fix clearing discovery type when stopping discovery



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: default avatarHemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 0ed09148
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;