From b3b228adf6fd71c089f4d3525b2bc3a6257f7f76 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Fri, 7 Sep 2018 12:10:57 -0400 Subject: Removed unused arguments to setEstablished/setTerminated. --- examples/dhtd.hs | 2 +- src/Network/Tox.hs | 2 +- src/Network/Tox/ContactInfo.hs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 45a2a682..cdaa73ed 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs @@ -1989,7 +1989,7 @@ main = do now <- getPOSIXTime forM_ (either (const Nothing) Just $ Tox.nodeInfo nid saddr) $ \ni -> do - atomically $ do setEstablished now them acnt + atomically $ do setEstablished them acnt setContactAddr now them ni acnt atomically $ do supply <- readTVar (Tox.listenerIDSupply netCryptoSessionsState) diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 7011618c..c1cdb151 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs @@ -379,7 +379,7 @@ mkDefaultDestroyHook roster = \session -> do ++ ") failure. (Still have sessions: [" ++ Data.List.intercalate "," (map showsession relevantSessions) ++ "]" - _ -> Right <$> setTerminated now (ncTheirPublicKey session) account + _ -> Right <$> setTerminated (ncTheirPublicKey session) account Nothing -> return . Left $ "(defaultDestroyHook) their is no account! pubkey=" ++ show (key2id (ncTheirPublicKey session)) case r of Left msg -> dput XMan msg diff --git a/src/Network/Tox/ContactInfo.hs b/src/Network/Tox/ContactInfo.hs index 5f144057..387a6e47 100644 --- a/src/Network/Tox/ContactInfo.hs +++ b/src/Network/Tox/ContactInfo.hs @@ -116,12 +116,12 @@ setContactAddr now remoteUserKey addr acc = do Nothing -> update >> notify -- or if we don't have any _ -> return () -- otherwise just wait -setEstablished :: POSIXTime -> PublicKey -> Account extra -> STM () -setEstablished now remoteUserKey acc = +setEstablished :: PublicKey -> Account extra -> STM () +setEstablished remoteUserKey acc = writeTChan (eventChan acc) $ SessionEstablished remoteUserKey -setTerminated :: POSIXTime -> PublicKey -> Account extra -> STM () -setTerminated now remoteUserKey acc = +setTerminated :: PublicKey -> Account extra -> STM () +setTerminated remoteUserKey acc = writeTChan (eventChan acc) $ SessionTerminated remoteUserKey -- cgit v1.2.3