Fix the AVRCP path miss-matching problem 53/225953/1 submit/tizen/20200226.220348
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 25 Feb 2020 22:52:24 +0000 (07:52 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 25 Feb 2020 22:53:50 +0000 (07:53 +0900)
Change-Id: Ibb934dc88605e1066b700254c708c2b16be78ffa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.c

index 730fde4..90f74fc 100644 (file)
@@ -52,9 +52,6 @@
 #define RFCOMM_DEFAULT_PROFILE_CHANNEL 0
 #define BT_AUDIO_SOURCE_MAX 2
 
-static char *avrcp_control_path = NULL;
-static char *avrcp_transport_path = NULL;
-
 static GDBusConnection *system_conn;
 static GDBusConnection *session_conn;
 static GDBusProxy *manager_gproxy = NULL;
@@ -396,8 +393,7 @@ char *_bt_hal_get_control_device_path(bt_bdaddr_t *bd_addr)
        char *control_path;
        char connected_address[BT_HAL_ADDRESS_STRING_SIZE];
 
-       if (avrcp_control_path != NULL)
-               return avrcp_control_path;
+       /* We can add the cache to get transport path for each device */
 
        _bt_hal_convert_addr_type_to_string(connected_address, bd_addr->address);
 
@@ -405,7 +401,6 @@ char *_bt_hal_get_control_device_path(bt_bdaddr_t *bd_addr)
        if (control_path == NULL)
                return NULL;
 
-       avrcp_control_path = control_path;
        DBG("control_path = %s", control_path);
        return control_path;
 }
@@ -415,8 +410,7 @@ char *_bt_hal_get_transport_device_path(bt_bdaddr_t *bd_addr)
        char *transport_path;
        char connected_address[BT_HAL_ADDRESS_STRING_SIZE];
 
-       if (avrcp_transport_path != NULL)
-               return avrcp_transport_path;
+       /* We can add the cache to get transport path for each device */
 
        _bt_hal_convert_addr_type_to_string(connected_address, bd_addr->address);
 
@@ -424,7 +418,6 @@ char *_bt_hal_get_transport_device_path(bt_bdaddr_t *bd_addr)
        if (transport_path == NULL)
                return NULL;
 
-       avrcp_transport_path = transport_path;
        DBG("transport_path = %s", transport_path);
        return transport_path;
 }