summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Onion/Transport.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-05-30 23:53:44 -0400
committerjoe <joe@jerkface.net>2018-05-30 23:53:44 -0400
commit514d0cad3f2ccaf0e89aadb4ab3067884ec20a6c (patch)
treea7d15e0d3592f123b10f2da3a458c023bd74de5b /src/Network/Tox/Onion/Transport.hs
parent2cffde93a0d814ebb54bdcbd3d6e598cbaae6ee1 (diff)
tox: Removed obsolete "userKeys" TVar, use keys from ContactInfo.
Diffstat (limited to 'src/Network/Tox/Onion/Transport.hs')
-rw-r--r--src/Network/Tox/Onion/Transport.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs
index 550a7730..d604a5c8 100644
--- a/src/Network/Tox/Onion/Transport.hs
+++ b/src/Network/Tox/Onion/Transport.hs
@@ -848,7 +848,7 @@ instance Read AnnouncedRendezvous where
848selectAlias :: TransportCrypto -> NodeId -> STM AliasSelector 848selectAlias :: TransportCrypto -> NodeId -> STM AliasSelector
849selectAlias crypto pkey = do 849selectAlias crypto pkey = do
850 ks <- filter (\(sk,pk) -> pk == id2key pkey) 850 ks <- filter (\(sk,pk) -> pk == id2key pkey)
851 <$> readTVar (userKeys crypto) 851 <$> userKeys crypto
852 maybe (return SearchingAlias) 852 maybe (return SearchingAlias)
853 (return . uncurry AnnouncingAlias) 853 (return . uncurry AnnouncingAlias)
854 (listToMaybe ks) 854 (listToMaybe ks)
@@ -859,7 +859,7 @@ parseDataToRoute
859 -> (OnionMessage Encrypted,OnionDestination r) 859 -> (OnionMessage Encrypted,OnionDestination r)
860 -> IO (Either ((PublicKey,OnionData),AnnouncedRendezvous) (OnionMessage Encrypted, OnionDestination r)) 860 -> IO (Either ((PublicKey,OnionData),AnnouncedRendezvous) (OnionMessage Encrypted, OnionDestination r))
861parseDataToRoute crypto (OnionToRouteResponse dta, od) = do 861parseDataToRoute crypto (OnionToRouteResponse dta, od) = do
862 ks <- atomically $ readTVar $ userKeys crypto 862 ks <- atomically $ userKeys crypto
863 863
864 omsg0 <- decryptMessage crypto (rendezvousSecret crypto,rendezvousPublic crypto) 864 omsg0 <- decryptMessage crypto (rendezvousSecret crypto,rendezvousPublic crypto)
865 (asymmNonce dta) 865 (asymmNonce dta)