diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-30 15:39:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-30 15:39:15 -0400 |
commit | 07cd1b2b40735d460c8225762fcf3992b9886c60 (patch) | |
tree | c08c38417dfd9cba94ac56e212fa9d5864927ac0 /Assistant/Pairing | |
parent | bab7e83221468905b76e28bb123ebe26e146b97b (diff) |
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
Diffstat (limited to 'Assistant/Pairing')
-rw-r--r-- | Assistant/Pairing/Network.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |