Fix : Visibility timer is not cancelled when PSCAN off 36/162436/1
authorSeungyoun Ju <sy39.ju@samsung.com>
Wed, 29 Nov 2017 09:02:07 +0000 (18:02 +0900)
committerSeungyoun Ju <sy39.ju@samsung.com>
Fri, 1 Dec 2017 05:55:16 +0000 (14:55 +0900)
[Problem] Visibility timer is not stopped when connectable mode is
 turned off.
[Cause & Measure] There is no logic to cancel timer. So this patch adds
 the cancel logic.
[Checking Method] Turn on limited discoverable mode -> Turn off
 connectable mode -> Check discoverable timeout event

Change-Id: Ic83084bf23876d3f44ecf0eec1661bfd5691e6cb

bt-service/bt-service-event-receiver.c

index 7a434cb..a980dad 100644 (file)
@@ -730,6 +730,8 @@ static void __bt_adapter_property_changed_event(GVariant *msg, const char *path)
                                                g_variant_unref(ret);
                                }
 
+                               _bt_stop_visibility_timer();
+
                                mode = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE;
 
                                /* Send event to application */