diff options
| author | Electric-Blue <Electric-Blue@users.noreply.github.com> | 2016-02-23 17:17:08 +0300 |
|---|---|---|
| committer | Electric-Blue <Electric-Blue@users.noreply.github.com> | 2016-02-23 17:17:08 +0300 |
| commit | 66c009382e3161f8782bc678ed49c8ee873e71e7 (patch) | |
| tree | 9a5ba1e2b5b7a20f34d0f4793045903702eba9dd | |
| parent | 2831978d45ff69080069e6cd31c965a4a8cba1e3 (diff) | |
| download | NimBluez-66c009382e3161f8782bc678ed49c8ee873e71e7.tar.gz NimBluez-66c009382e3161f8782bc678ed49c8ee873e71e7.zip | |
Bug fix with htob in getRfcommAddr proc.
| -rw-r--r-- | nimbluez/bluetoothnativesockets.nim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nimbluez/bluetoothnativesockets.nim b/nimbluez/bluetoothnativesockets.nim index e12b800..cb50807 100644 --- a/nimbluez/bluetoothnativesockets.nim +++ b/nimbluez/bluetoothnativesockets.nim @@ -268,14 +268,12 @@ proc getAddrPort*(sockAddr: L2capAddr): L2capPort when useWinVersion: proc getRfcommAddr*(port = RfcommPort(0), address = ""): RfcommAddr = result.addressFamily = htobs( - toInt(BluetoothDomain.AF_BLUETOOTH).int16).uint16 + toInt(BluetoothDomain.AF_BLUETOOTH).uint16) if address != nil and address != "": result.btAddr = htobll( - parseBluetoothAddress(address).ano_116103095.ullLong.int32).uint32 + parseBluetoothAddress(address).ano_116103095.ullLong) #result.serviceClassId = - #TODO: use htob... proc there. - result.port = htobl(if port == 0: -1'i32 else: int32(port)) - #result.port = htobl(ULONG(port)) + result.port = htobl(if port == 0: -1'i32 else: port.int32).uint32 proc getL2capAddr*(port = L2capPort(0), address = ""): L2capAddr = |
