Diff between cae9fbfc039917778e47f371db9d683c273e1556 and 57bd6dd224eb7eb5683321685b5ea8b093843bfa
Changed Files
| File | Additions | Deletions | Status |
| plugins/hciops.c | +11 | -1 | modified |
Full Patch
diff --git a/plugins/hciops.c b/plugins/hciops.c
index 8653ab5..c3a28b9 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -3247,8 +3247,18 @@ static int hciops_start_discovery(int index)
static int hciops_stop_discovery(int index)
{
+ struct dev_info *dev = &devs[index];
+
DBG("index %d", index);
- return -ENOSYS;
+
+ switch (dev->discov_state) {
+ case DISCOV_INQ:
+ return hciops_stop_inquiry(index);
+ case DISCOV_SCAN:
+ return hciops_stop_scanning(index);
+ default:
+ return -EINVAL;
+ }
}
static int hciops_fast_connectable(int index, gboolean enable)