Bluetooth: GATT: Fix not always calling discover destroy callback

If the function callback returns BT_GATT_ITER_STOP it should cause
the destroy callback to be called to indicate the discover is no longer
active.

Change-Id: Ifc35c375633e38483b2b4bace2c26bab7f02dcb6
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2015-07-06 17:10:45 +03:00 committed by Anas Nashif
commit cfb12dbb61

View file

@ -528,7 +528,7 @@ static void att_find_type_rsp(struct bt_conn *conn, uint8_t err,
BT_GATT_PRIMARY_SERVICE(start_handle, params->uuid));
if (params->func(attr, params) == BT_GATT_ITER_STOP) {
return;
goto done;
}
}