Revert "Fix: ConnectProfiles never be returned" 03/216303/1 accepted/tizen/unified/20191101.042116 submit/tizen/20191031.005137
authorDeokhyun Kim <dukan.kim@samsung.com>
Wed, 23 Oct 2019 07:01:42 +0000 (16:01 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Wed, 23 Oct 2019 07:01:42 +0000 (16:01 +0900)
commit509a01d43ce9489c9159a3cca65968131f1ca672
tree2b6f55cc660c00d95674a36d699977b5f83e3fd5
parentf3c215a62b20dcd9dd044992e7a2691d8dcf94c4
Revert "Fix: ConnectProfiles never be returned"

This reverts commit 1d77526f4dad3e322504a780770836129931796a

When prior connection fails, dev->connect was not released
Release connect resources when connection fails

// First connect
Oct 17 14:30:55 localhost bluetoothd[6459]: src/device.c:connect_profiles() /org/bluez/hci0/dev_XX_XX_XX_XX_EB_3C 0000111e-0000-1000-8000-00805f9b34fb, client :1.18
Oct 17 14:31:00 localhost bluetoothd[6459]: src/device.c:device_profile_connected() Hands-Free Audio Gateway Host is down (112)
Oct 17 14:31:00 localhost bluetoothd[6459]: src/device.c:connect_profiles() /org/bluez/hci0/dev_XX_XX_XX_XX_EB_3C 0000110b-0000-1000-8000-00805f9b34fb, client :1.18
Oct 17 14:31:01 localhost bluetoothd[6459]: src/device.c:device_profile_connected() a2dp-sink Resource temporarily unavailable (11)

// Second connect
Oct 17 14:32:10 localhost bluetoothd[6459]: src/device.c:connect_profiles() /org/bluez/hci0/dev_XX_XX_XX_XX_EB_3C 0000111e-0000-1000-8000-00805f9b34fb, client :1.18
10-17 14:32:10.327+0900 E/BLUETOOTH_FRWK_SERVICE(P 2694, T 2694): bt-service-audio.c: __bt_audio_request_cb(781) > Audio Connect/Disconnect Dbus Call Error: GDBus.Error:org.bluez.Error.InProgress: In Progress

Change-Id: I8caa4f43f51a7b302b5afc8a5028a22776d97cf5
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
src/device.c