diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-05-30 05:48:55 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-05-30 05:48:55 +0000 |
commit | c02d5af1b826c6aba99a93547e30e140e7b161d3 (patch) | |
tree | 718f7fe377656aa96983805aae73a09c3741db45 /src/Network/Tox/Crypto | |
parent | b8148ecef7246b04f103ec90e4022db7d1c78da6 (diff) |
remove byteswqp on last2Bytes
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 3acc6350..2a28adc5 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -728,7 +728,7 @@ cryptoNetHandler sessions addr (NetCrypto (CryptoPacket nonce16 encrypted)) = do | |||
728 | where | 728 | where |
729 | last2Bytes :: Nonce24 -> Word16 | 729 | last2Bytes :: Nonce24 -> Word16 |
730 | last2Bytes (Nonce24 bs) = case S.decode (B.drop 22 bs) of | 730 | last2Bytes (Nonce24 bs) = case S.decode (B.drop 22 bs) of |
731 | Right n -> byteSwap16 n -- trace ("byteSwap16 " ++ printf "0x%x" n ++ " = " ++ printf "0x%x" (byteSwap16 n)) $ byteSwap16 n | 731 | Right n -> n -- trace ("byteSwap16 " ++ printf "0x%x" n ++ " = " ++ printf "0x%x" (byteSwap16 n)) $ byteSwap16 n |
732 | _ -> error "unreachable-last2Bytes" | 732 | _ -> error "unreachable-last2Bytes" |
733 | dATA_NUM_THRESHOLD = 21845 -- = 65535 / 3 | 733 | dATA_NUM_THRESHOLD = 21845 -- = 65535 / 3 |
734 | 734 | ||