summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/AliceBob.hs10
-rw-r--r--src/Network/Tox/Onion/Handlers.hs1
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
11import Crypto.Error 12import Crypto.Error
12import Data.Word 13import Data.Word
13import Data.ByteString as B 14import Data.ByteString as B
14import qualified Data.ByteArray as BA
15 15
16 16
17alicesk_bytes :: [Word8] 17alicesk_bytes :: [Word8]
@@ -27,10 +27,10 @@ CryptoPassed alicesk = secretKey $ B.pack alicesk_bytes
27 27
28alicepk_bytes :: [Word8] 28alicepk_bytes :: [Word8]
29alicepk_bytes = 29alicepk_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
36alicepk :: PublicKey 36alicepk :: 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