diff options
author | joe <joe@jerkface.net> | 2017-10-31 00:19:12 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-10-31 00:19:12 -0400 |
commit | 4188bfddf8ffb547122f08bb70b11d7f16c56220 (patch) | |
tree | f2886da27615b954e85e11511e570fe022fdd1de /src | |
parent | 9186fda93431470a169427f538e4268b19ab489f (diff) |
Fixed ambiguous type error.
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/Tox.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 79bd68ac..87835769 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -314,7 +314,7 @@ newTox keydb addr = do | |||
314 | { toxDHT = dhtclient | 314 | { toxDHT = dhtclient |
315 | , toxOnion = onionclient | 315 | , toxOnion = onionclient |
316 | , toxToRoute = onInbound (updateRoster roster) dtacrypt | 316 | , toxToRoute = onInbound (updateRoster roster) dtacrypt |
317 | , toxCrypto = addHandler (reportParseError $ printErrors stderr) (cryptoNetHandler sessionsState) cryptonet | 317 | , toxCrypto = addHandler (hPutStrLn stderr) (cryptoNetHandler sessionsState) cryptonet |
318 | , toxCryptoKeys = crypto | 318 | , toxCryptoKeys = crypto |
319 | , toxRouting = routing | 319 | , toxRouting = routing |
320 | , toxTokens = toks | 320 | , toxTokens = toks |
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index f2c792cd..29f55e54 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -46,6 +46,7 @@ data HandshakeParams | |||
46 | newHandShakeData :: TransportCrypto -> HandshakeParams -> HandshakeData | 46 | newHandShakeData :: TransportCrypto -> HandshakeParams -> HandshakeData |
47 | newHandShakeData = error "todo" | 47 | newHandShakeData = error "todo" |
48 | 48 | ||
49 | cryptoNetHandler :: NetCryptoSessions -> SockAddr -> NetCrypto -> IO (Maybe (NetCrypto -> NetCrypto)) | ||
49 | cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) nonce24 encrypted)) = do | 50 | cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) nonce24 encrypted)) = do |
50 | let crypto = transportCrypto sessions | 51 | let crypto = transportCrypto sessions |
51 | allsessions = netCryptoSessions sessions | 52 | allsessions = netCryptoSessions sessions |
@@ -122,4 +123,4 @@ cryptoNetHandler sessions addr (NetCrypto (CryptoPacket nonce16 encrypted)) = do | |||
122 | -- Handle Encrypted Message | 123 | -- Handle Encrypted Message |
123 | -- TODO | 124 | -- TODO |
124 | return Nothing | 125 | return Nothing |
125 | cryptoNetHandlerr _ _ _ = return id | 126 | -- cryptoNetHandler _ _ _ = return $ Just id |