device: Set disconnect timer to zero for fast disconnection 42/309242/1 accepted/tizen/7.0/unified/20240409.073801 accepted/tizen/7.0/unified/20240409.104411
authorSohyeon Choi <shss.choi@samsung.com>
Sun, 7 Apr 2024 14:11:32 +0000 (23:11 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 8 Apr 2024 02:38:35 +0000 (11:38 +0900)
Change-Id: I8d6d3741b05abb9c2f5a18a34eb197f9a924d149

src/device.c

index 59edef1b56545b7bb9e8edb00cf3612755a563c5..1b627524edfad445884416afffad7881ca2e176b 100644 (file)
@@ -2286,9 +2286,16 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg)
                return;
        }
 
-       device->disconn_timer = timeout_add_seconds(DISCONNECT_TIMER,
-                                                       disconnect_all,
-                                                       device, NULL);
+       if (TIZEN_FEATURE_BLUEZ_DA) {
+               DBG("set disconnect timer to zero for fast disconnection");
+               device->disconn_timer = timeout_add_seconds(0,
+                                                               disconnect_all,
+                                                               device, NULL);
+       } else {
+               device->disconn_timer = timeout_add_seconds(DISCONNECT_TIMER,
+                                                               disconnect_all,
+                                                               device, NULL);
+       }
 }
 
 bool device_is_disconnecting(struct btd_device *device)