Fix : Visibility timer is not cancelled when PSCAN off 25/162525/1 accepted/tizen/unified/20171207.070143 submit/tizen/20171206.015028
authorSeungyoun Ju <sy39.ju@samsung.com>
Wed, 29 Nov 2017 09:02:07 +0000 (18:02 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 4 Dec 2017 05:33:50 +0000 (14:33 +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: Icc800e9704f8c9cdb09338f2d1e5504d5c60f64d
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
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 */