From 07cd1b2b40735d460c8225762fcf3992b9886c60 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Oct 2012 15:39:15 -0400 Subject: pushed Assistant monad down into DaemonStatus code Currently have three old versions of functions that more reworking is needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and modifyDaemonStatusOld --- Assistant/Pairing/Network.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Assistant/Pairing') diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs index 3283fbc8c..9b030617e 100644 --- a/Assistant/Pairing/Network.hs +++ b/Assistant/Pairing/Network.hs @@ -80,7 +80,7 @@ startSending :: DaemonStatusHandle -> PairingInProgress -> PairStage -> (PairSta startSending dstatus pip stage sender = void $ forkIO $ do tid <- myThreadId let pip' = pip { inProgressPairStage = stage, inProgressThreadId = Just tid } - oldpip <- modifyDaemonStatus dstatus $ + oldpip <- modifyDaemonStatusOld dstatus $ \s -> (s { pairingInProgress = Just pip' }, pairingInProgress s) maybe noop stopold oldpip sender stage @@ -90,7 +90,7 @@ startSending dstatus pip stage sender = void $ forkIO $ do stopSending :: PairingInProgress -> DaemonStatusHandle -> IO () stopSending pip dstatus = do maybe noop killThread $ inProgressThreadId pip - modifyDaemonStatus_ dstatus $ \s -> s { pairingInProgress = Nothing } + modifyDaemonStatusOld_ dstatus $ \s -> s { pairingInProgress = Nothing } class ToSomeAddr a where toSomeAddr :: a -> SomeAddr -- cgit v1.2.3