Fix A2DP sink disconnection issue on streaming 07/266007/1
authordh79pyun <dh79.pyun@samsung.com>
Wed, 3 Nov 2021 02:38:43 +0000 (11:38 +0900)
committerdh79pyun <dh79.pyun@samsung.com>
Wed, 3 Nov 2021 02:38:43 +0000 (11:38 +0900)
The logic of disconnect_timeout was changed in bluez 5.55.
So we should modify Tizen specific logic for that.

Change-Id: Ic54b39d08b7f403407ae7dfa9ca6c9207bb1c4c5
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
profiles/audio/avdtp.c

index 9cfe5a1..9298ae1 100644 (file)
@@ -1511,8 +1511,12 @@ static gboolean disconnect_timeout(gpointer user_data)
                bdaddr = device_get_address(session->device);
                if (adapter && bdaddr)
                        device = btd_adapter_find_device(adapter, bdaddr, BDADDR_BREDR);
-               if (!device)
-                       error("device is NOT found");
+               if (device) {
+                       DBG("device exists");
+                       goto done;
+               }
+
+               error("device is NOT found");
        }
 #endif