summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index d7ee040f..65498699 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -1395,12 +1395,15 @@ toxman announcer toxbkts tox presence = ToxManager
1395 1395
1396 , setToxConnectionPolicy = \me them p -> do 1396 , setToxConnectionPolicy = \me them p -> do
1397 hPutStrLn stderr $ "toxman ConnectionPolicy " ++ show (me,them,p) 1397 hPutStrLn stderr $ "toxman ConnectionPolicy " ++ show (me,them,p)
1398 forM_ (do meid <- readMaybe $ T.unpack $ T.take 43 me
1399 themid <- readMaybe $ T.unpack $ T.take 43 them
1400 return $ Tox.Key meid themid) $ \k -> do
1401 setPolicy (Tox.toxMgr tox) k p
1398 case p of 1402 case p of
1399 TryingToConnect -> do 1403 TryingToConnect -> do
1400 let db@ContactInfo{ accounts } = Tox.toxContactInfo tox 1404 let db@ContactInfo{ accounts } = Tox.toxContactInfo tox
1401 sequence_ $ do 1405 sequence_ $ do
1402 meid <- readMaybe $ T.unpack $ T.take 43 me 1406 let Tox.Key meid themid = k
1403 themid <- readMaybe $ T.unpack $ T.take 43 them
1404 Just $ atomically $ do 1407 Just $ atomically $ do
1405 accs <- readTVar accounts 1408 accs <- readTVar accounts
1406 case HashMap.lookup meid accs of 1409 case HashMap.lookup meid accs of