Fix the bug for the A2DP connection 75/71975/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 30 May 2016 04:55:47 +0000 (13:55 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 30 May 2016 04:55:47 +0000 (13:55 +0900)
When an application uses BT_AUDIO_PROFILE_TYPE_ALL to connect,
HSP profile only be connected because of the wrong logic in
bt-service's audio connected list.

Change-Id: If1d9569a018bc02c1a3c863bd21e01ff6715533b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-service-audio.c

index a16679a..31949eb 100755 (executable)
@@ -661,8 +661,10 @@ int _bt_audio_connect(int request_id, int type,
                if (__bt_device_support_uuid(address, BT_AUDIO_HSP)) {
                        uuid = HFP_HS_UUID;
                        func_data->pending = BT_PENDING_CONNECT;
+                       type = BT_AUDIO_HSP;
                } else if (__bt_device_support_uuid(address, BT_AUDIO_A2DP)) {
                        uuid = A2DP_SINK_UUID;
+                       type = BT_AUDIO_A2DP;
                } else {
                        BT_ERR("No audio role supported");
                        result = BLUETOOTH_ERROR_SERVICE_NOT_FOUND;