From 57bd6dd224eb7eb5683321685b5ea8b093843bfa Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Fri, 29 Apr 2011 21:27:29 -0300 Subject: [PATCH] Implement stop_discovery hciops callback --- plugins/hciops.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/hciops.c b/plugins/hciops.c index 8653ab5d3..c3a28b9eb 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) -- 2.47.3