summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Presence/XMPPServer.hs5
-rw-r--r--src/DPut.hs2
-rw-r--r--src/Network/Tox/Onion/Transport.hs2
3 files changed, 5 insertions, 4 deletions
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs
index ffa02b25..936b2137 100644
--- a/Presence/XMPPServer.hs
+++ b/Presence/XMPPServer.hs
@@ -98,6 +98,7 @@ import Data.Void (Void)
98import System.Endian (toBE32) 98import System.Endian (toBE32)
99import Control.Applicative 99import Control.Applicative
100import System.IO 100import System.IO
101import DPut
101 102
102-- peerport :: PortNumber 103-- peerport :: PortNumber
103-- peerport = 5269 104-- peerport = 5269
@@ -281,10 +282,10 @@ peerKeyToText (ClientKey { localAddress=addr }) = "ErrorClIeNt0"
281 282
282 283
283wlog :: String -> IO () 284wlog :: String -> IO ()
284wlog s = putStrLn s >> hFlush stdout 285wlog = dput XWLog
285 286
286wlogb :: ByteString -> IO () 287wlogb :: ByteString -> IO ()
287wlogb s = Strict8.putStrLn s >> hFlush stdout 288wlogb = wlog . Strict8.unpack
288 289
289flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) 290flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b)
290flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes 291flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes
diff --git a/src/DPut.hs b/src/DPut.hs
index 3cb31160..b305a581 100644
--- a/src/DPut.hs
+++ b/src/DPut.hs
@@ -7,7 +7,7 @@ import Data.Maybe
7import System.IO.Unsafe (unsafePerformIO) 7import System.IO.Unsafe (unsafePerformIO)
8import System.Log.Logger 8import System.Log.Logger
9 9
10data DebugTag = XAnnounce | XDHT | XOnion | XNetCrypto | XPing | XLan | XMisc 10data DebugTag = XAnnounce | XDHT | XOnion | XNetCrypto | XPing | XLan | XMisc | XWLog
11 deriving (Eq,Ord,Show,Read,Enum,Bounded) 11 deriving (Eq,Ord,Show,Read,Enum,Bounded)
12 12
13appName :: String 13appName :: String
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs
index 0da48f76..8a66f2b2 100644
--- a/src/Network/Tox/Onion/Transport.hs
+++ b/src/Network/Tox/Onion/Transport.hs
@@ -924,7 +924,7 @@ encodeDataToRoute crypto ((me,omsg), AnnouncedRendezvous toxid (Rendezvous pub n
924 } 924 }
925 outerSecret <- lookupSharedSecret crypto (onionAliasSecret crypto) pub nonce 925 outerSecret <- lookupSharedSecret crypto (onionAliasSecret crypto) pub nonce
926 let dta = ToxCrypto.encrypt outerSecret plain 926 let dta = ToxCrypto.encrypt outerSecret plain
927 hPutStrLn stderr $ unlines 927 dput XOnion $ unlines
928 [ "encodeDataToRoute me=" ++ show (key2id me) 928 [ "encodeDataToRoute me=" ++ show (key2id me)
929 , " dhtpk=" ++ case omsg of 929 , " dhtpk=" ++ case omsg of
930 OnionDHTPublicKey dmsg -> show (key2id $ dhtpk dmsg) 930 OnionDHTPublicKey dmsg -> show (key2id $ dhtpk dmsg)