diff options
-rw-r--r-- | Assistant.hs | 10 | ||||
-rw-r--r-- | Assistant/Threads/PushNotifier.hs | 2 | ||||
-rw-r--r-- | Assistant/XMPP.hs | 3 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | git-annex.cabal | 2 |
5 files changed, 8 insertions, 11 deletions
diff --git a/Assistant.hs b/Assistant.hs index 0fdda6997..acb9453f3 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -216,17 +216,15 @@ startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do , assist $ transferScannerThread st dstatus scanremotes transferqueue , assist $ configMonitorThread st dstatus branchhandle commitchan #ifdef WITH_XMPP - {- Bound thread, because TLS needs it. -} - , bound $ assist $ pushNotifierThread st dstatus pushnotifier + , assist $ pushNotifierThread st dstatus pushnotifier #endif , watch $ watchThread st dstatus transferqueue changechan ] waitForTermination - watch a = (forkIO, True, a) - assist a = (forkIO, False, a) - bound (_, watcher, t) = (forkOS, watcher, t) + watch a = (True, a) + assist a = (False, a) startthread dstatus (runner, watcher, t) - | watcher || assistant = void $ runner $ + | watcher || assistant = void $ forkIO $ runNamedThread dstatus t | otherwise = noop diff --git a/Assistant/Threads/PushNotifier.hs b/Assistant/Threads/PushNotifier.hs index 8c71138d7..9f15d5419 100644 --- a/Assistant/Threads/PushNotifier.hs +++ b/Assistant/Threads/PushNotifier.hs @@ -35,7 +35,7 @@ pushNotifierThread st dstatus pushnotifier = NamedThread thisThread $ do fulljid <- bindJID jid liftIO $ debug thisThread ["XMPP connected", show fulljid] s <- getSession - _ <- liftIO $ forkOS $ void $ runXMPP s $ + _ <- liftIO $ forkIO $ void $ runXMPP s $ receivenotifications sendnotifications where diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs index d71bd7eaf..75d948cbd 100644 --- a/Assistant/XMPP.hs +++ b/Assistant/XMPP.hs @@ -28,11 +28,10 @@ data XMPPCreds = XMPPCreds } deriving (Read, Show) -{- Note that this must be run in a bound thread; gnuTLS requires it. -} connectXMPP :: XMPPCreds -> (JID -> XMPP a) -> IO (Either SomeException ()) connectXMPP c a = case parseJID (xmppJID c) of Nothing -> error "bad JID" - Just jid -> runInBoundThread $ connectXMPP' jid c a + Just jid -> connectXMPP' jid c a {- Do a SRV lookup, but if it fails, fall back to the cached xmppHostname. -} connectXMPP' :: JID -> XMPPCreds -> (JID -> XMPP a) -> IO (Either SomeException ()) diff --git a/debian/control b/debian/control index edd5e4d61..18564a4e2 100644 --- a/debian/control +++ b/debian/control @@ -40,7 +40,7 @@ Build-Depends: libghc-network-multicast-dev, libghc-network-info-dev, libghc-safesemaphore-dev, - libghc-network-protocol-xmpp-dev, + libghc-network-protocol-xmpp-dev (>= 0.4.3-2), ikiwiki, perlmagick, git, diff --git a/git-annex.cabal b/git-annex.cabal index 887cd9841..4e910183c 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -98,7 +98,7 @@ Executable git-annex CPP-Options: -DWITH_PAIRING if flag(XMPP) && flag(Assistant) - Build-Depends: network-protocol-xmpp + Build-Depends: network-protocol-xmpp, gnutls (>= 0.1.4) CPP-Options: -DWITH_XMPP if flag(XMPP) && flag(Assistant) && flag(Adns) |