From: Wootak Jung Date: Wed, 13 Jan 2021 22:12:17 +0000 (+0900) Subject: [Bluetooth][Non-ACR] GetBondedDevice converting issue (#2518) X-Git-Tag: submit/tizen_6.0/20210115.005236~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=244da0767bc2ab9d3b479c3774025af567235417;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Bluetooth][Non-ACR] GetBondedDevice converting issue (#2518) Signed-off-by: Wootak Jung --- diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs index e577543..b2788c5 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs @@ -492,6 +492,7 @@ namespace Tizen.Network.Bluetooth internal BluetoothDevice GetBondedDevice(string address) { IntPtr deviceInfo; + BluetoothDevice btDevice; int ret = Interop.Bluetooth.GetBondedDeviceByAddress(address, out deviceInfo); if(ret != (int)BluetoothError.None) { @@ -499,9 +500,9 @@ namespace Tizen.Network.Bluetooth BluetoothErrorFactory.ThrowBluetoothException(ret); } BluetoothDeviceStruct device = (BluetoothDeviceStruct)Marshal.PtrToStructure(deviceInfo, typeof(BluetoothDeviceStruct)); - + btDevice = BluetoothUtils.ConvertStructToDeviceClass(device); Interop.Bluetooth.FreeDeviceInfo(deviceInfo); - return BluetoothUtils.ConvertStructToDeviceClass(device); + return btDevice; } internal bool IsServiceUsed(string serviceUuid)