diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-28 12:26:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-28 12:26:16 -0400 |
commit | 900c29071ad6b342be4eea00439fc355503ecbd2 (patch) | |
tree | d35adcadd1f063f1ae5b7205e82b845f18c8dd5f /Utility | |
parent | 7a15547943bf87131b13804c9337eec59f9b9350 (diff) | |
parent | 68f5d56115c2e4011b9a9be7c2585c1fe43f4957 (diff) |
Merge branch 'no-xmpp'
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/MagicWormhole.hs | 4 | ||||
-rw-r--r-- | Utility/Tor.hs | 3 | ||||
-rw-r--r-- | Utility/WebApp.hs | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs index e217dcdca..3743f352c 100644 --- a/Utility/MagicWormhole.hs +++ b/Utility/MagicWormhole.hs @@ -78,7 +78,7 @@ mkCodeProducer :: IO CodeProducer mkCodeProducer = CodeProducer <$> newEmptyMVar waitCode :: CodeObserver -> IO Code -waitCode (CodeObserver o) = takeMVar o +waitCode (CodeObserver o) = readMVar o sendCode :: CodeProducer -> Code -> IO () sendCode (CodeProducer p) = putMVar p @@ -119,7 +119,7 @@ sendFile f (CodeObserver observer) ps = do -- read from the CodeProducer, and fed to wormhole on stdin. receiveFile :: FilePath -> CodeProducer -> WormHoleParams -> IO Bool receiveFile f (CodeProducer producer) ps = runWormHoleProcess p $ \hin _hout -> do - Code c <- takeMVar producer + Code c <- readMVar producer hPutStrLn hin c hFlush hin return True diff --git a/Utility/Tor.hs b/Utility/Tor.hs index 4e7c0ef43..37fbabd40 100644 --- a/Utility/Tor.hs +++ b/Utility/Tor.hs @@ -161,3 +161,6 @@ torLibDir = "/var/lib/tor" varLibDir :: FilePath varLibDir = "/var/lib" + +torIsInstalled :: IO Bool +torIsInstalled = inPath "tor" diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index a90772b10..a00a5caf2 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -84,7 +84,6 @@ fixSockAddr addr = addr -- disable buggy sloworis attack prevention code webAppSettings :: Settings - webAppSettings = setTimeout halfhour defaultSettings where halfhour = 30 * 60 |