diff options
-rw-r--r-- | examples/AliceBob.hs | 10 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Handlers.hs | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/examples/AliceBob.hs b/examples/AliceBob.hs index a7ec26f1..529b92d5 100644 --- a/examples/AliceBob.hs +++ b/examples/AliceBob.hs | |||
@@ -4,6 +4,7 @@ module AliceBob | |||
4 | , PublicKey | 4 | , PublicKey |
5 | , CryptoFailable(..) | 5 | , CryptoFailable(..) |
6 | , secretKey | 6 | , secretKey |
7 | , publicKey | ||
7 | , toPublic | 8 | , toPublic |
8 | ) where | 9 | ) where |
9 | 10 | ||
@@ -11,7 +12,6 @@ import Crypto.PubKey.Curve25519 (SecretKey,PublicKey,secretKey,publicKey,toPubli | |||
11 | import Crypto.Error | 12 | import Crypto.Error |
12 | import Data.Word | 13 | import Data.Word |
13 | import Data.ByteString as B | 14 | import Data.ByteString as B |
14 | import qualified Data.ByteArray as BA | ||
15 | 15 | ||
16 | 16 | ||
17 | alicesk_bytes :: [Word8] | 17 | alicesk_bytes :: [Word8] |
@@ -27,10 +27,10 @@ CryptoPassed alicesk = secretKey $ B.pack alicesk_bytes | |||
27 | 27 | ||
28 | alicepk_bytes :: [Word8] | 28 | alicepk_bytes :: [Word8] |
29 | alicepk_bytes = | 29 | alicepk_bytes = |
30 | [ 0x85,0x20,0xf0,0x09,0x89,0x30,0xa7,0x54 | 30 | [0x85,0x20,0xf0,0x09,0x89,0x30,0xa7,0x54 |
31 | , 0x74,0x8b,0x7d,0xdc,0xb4,0x3e,0xf7,0x5a | 31 | ,0x74,0x8b,0x7d,0xdc,0xb4,0x3e,0xf7,0x5a |
32 | , 0x0d,0xbf,0x3a,0x0d,0x26,0x38,0x1a,0xf4 | 32 | ,0x0d,0xbf,0x3a,0x0d,0x26,0x38,0x1a,0xf4 |
33 | , 0xeb,0xa4,0xa9,0x8e,0xaa,0x9b,0x4e,0x6a | 33 | ,0xeb,0xa4,0xa9,0x8e,0xaa,0x9b,0x4e,0x6a |
34 | ] | 34 | ] |
35 | 35 | ||
36 | alicepk :: PublicKey | 36 | alicepk :: PublicKey |
diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs index 0d8a9151..a16508cd 100644 --- a/src/Network/Tox/Onion/Handlers.hs +++ b/src/Network/Tox/Onion/Handlers.hs | |||
@@ -283,6 +283,7 @@ sendOnion getTimeout client req oaddr unwrap = | |||
283 | -- Four tries and then we tap out. | 283 | -- Four tries and then we tap out. |
284 | flip fix 4 $ \loop n -> do | 284 | flip fix 4 $ \loop n -> do |
285 | mb <- QR.sendQuery client (announceSerializer getTimeout) req oaddr | 285 | mb <- QR.sendQuery client (announceSerializer getTimeout) req oaddr |
286 | forM_ mb $ \r -> dput XAnnounce $ show (onionNodeInfo oaddr) ++ " sent response: " ++ show r | ||
286 | maybe (if n>0 then loop $! n - 1 else return Nothing) | 287 | maybe (if n>0 then loop $! n - 1 else return Nothing) |
287 | (return . Just . unwrap (onionNodeInfo oaddr)) | 288 | (return . Just . unwrap (onionNodeInfo oaddr)) |
288 | $ join mb | 289 | $ join mb |