From: Wootak Jung Date: Wed, 10 Mar 2021 02:32:52 +0000 (+0900) Subject: [Bluetooth][Non-ACR] GetBondedDevice converting issue (#2517) X-Git-Tag: submit/tizen/20210311.005524~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bed221bdeaef1118a3e0b109eb28c71279dff5c;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Bluetooth][Non-ACR] GetBondedDevice converting issue (#2517) Signed-off-by: Wootak Jung Co-authored-by: dh79pyun <31202060+dh79pyun@users.noreply.github.com> --- diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAdapterImpl.cs index e57754347..b2788c5fc 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)