diff options
-rw-r--r-- | Presence/XMPPServer.hs | 5 | ||||
-rw-r--r-- | src/DPut.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Transport.hs | 2 |
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) | |||
98 | import System.Endian (toBE32) | 98 | import System.Endian (toBE32) |
99 | import Control.Applicative | 99 | import Control.Applicative |
100 | import System.IO | 100 | import System.IO |
101 | import 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 | ||
283 | wlog :: String -> IO () | 284 | wlog :: String -> IO () |
284 | wlog s = putStrLn s >> hFlush stdout | 285 | wlog = dput XWLog |
285 | 286 | ||
286 | wlogb :: ByteString -> IO () | 287 | wlogb :: ByteString -> IO () |
287 | wlogb s = Strict8.putStrLn s >> hFlush stdout | 288 | wlogb = wlog . Strict8.unpack |
288 | 289 | ||
289 | flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) | 290 | flushPassThrough :: Monad m => Conduit a m b -> Conduit (Flush a) m (Flush b) |
290 | flushPassThrough c = getZipConduit $ ZipConduit (onlyChunks =$= mapOutput Chunk c) <* ZipConduit onlyFlushes | 291 | flushPassThrough 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 | |||
7 | import System.IO.Unsafe (unsafePerformIO) | 7 | import System.IO.Unsafe (unsafePerformIO) |
8 | import System.Log.Logger | 8 | import System.Log.Logger |
9 | 9 | ||
10 | data DebugTag = XAnnounce | XDHT | XOnion | XNetCrypto | XPing | XLan | XMisc | 10 | data 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 | ||
13 | appName :: String | 13 | appName :: 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) |