aboutsummaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-28 12:26:16 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-28 12:26:16 -0400
commit900c29071ad6b342be4eea00439fc355503ecbd2 (patch)
treed35adcadd1f063f1ae5b7205e82b845f18c8dd5f /Utility
parent7a15547943bf87131b13804c9337eec59f9b9350 (diff)
parent68f5d56115c2e4011b9a9be7c2585c1fe43f4957 (diff)
Merge branch 'no-xmpp'
Diffstat (limited to 'Utility')
-rw-r--r--Utility/MagicWormhole.hs4
-rw-r--r--Utility/Tor.hs3
-rw-r--r--Utility/WebApp.hs1
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