diff options
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index e79b66fc..f59809fd 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -1047,10 +1047,16 @@ sendCrypto crypto session updateLocal cm = do | |||
1047 | PQ.OGEncodeFail -> return (Left "Failed to encode outgoing packet") | 1047 | PQ.OGEncodeFail -> return (Left "Failed to encode outgoing packet") |
1048 | 1048 | ||
1049 | sendOnline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) | 1049 | sendOnline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) |
1050 | sendOnline crypto session = sendCrypto crypto session (return ()) (OneByte ONLINE) | 1050 | sendOnline crypto session = do |
1051 | let cm=OneByte ONLINE | ||
1052 | addMsgToLastN False (cm ^. messageType) session (Out cm) | ||
1053 | sendCrypto crypto session (return ()) (OneByte ONLINE) | ||
1051 | 1054 | ||
1052 | sendOffline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) | 1055 | sendOffline :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) |
1053 | sendOffline crypto session = sendCrypto crypto session (return ()) (OneByte OFFLINE) | 1056 | sendOffline crypto session = do |
1057 | let cm=OneByte OFFLINE | ||
1058 | addMsgToLastN False (cm ^. messageType) session (Out cm) | ||
1059 | sendCrypto crypto session (return ()) (OneByte OFFLINE) | ||
1054 | 1060 | ||
1055 | 1061 | ||
1056 | sendKill :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) | 1062 | sendKill :: TransportCrypto -> NetCryptoSession -> IO (Either String ()) |