diff options
-rw-r--r-- | examples/dhtd.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 892fc88c..bef09b75 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -1693,8 +1693,7 @@ onNewToxSession sv ssvar ContactInfo{accounts} addrTox netcrypto = do | |||
1693 | selectManager :: Maybe (t -> ToxManager clientAddress) -> Manager Tcp.TCPStatus T.Text -> T.Text -> Manager Pending T.Text | 1693 | selectManager :: Maybe (t -> ToxManager clientAddress) -> Manager Tcp.TCPStatus T.Text -> T.Text -> Manager Pending T.Text |
1694 | selectManager mtman tcp profile = case T.splitAt 43 profile of | 1694 | selectManager mtman tcp profile = case T.splitAt 43 profile of |
1695 | (k,".tox") | Just tman <- mtman | 1695 | (k,".tox") | Just tman <- mtman |
1696 | -> let _ = _ | 1696 | -> let -- The following error call is safe because the toxConnections field |
1697 | -- The following error call is safe because the toxConnections field | ||
1698 | -- does not make use of the PresenceState passed to tman. | 1697 | -- does not make use of the PresenceState passed to tman. |
1699 | tox = toxConnections $ tman $ error "PresenseState" | 1698 | tox = toxConnections $ tman $ error "PresenseState" |
1700 | tkey them = do | 1699 | tkey them = do |
@@ -1724,6 +1723,7 @@ selectManager mtman tcp profile = case T.splitAt 43 profile of | |||
1724 | dput XMan $ "reverseAddress(tox)" ++ show (T.take 8 k,paddr) ++ ": " ++ show r | 1723 | dput XMan $ "reverseAddress(tox)" ++ show (T.take 8 k,paddr) ++ ": " ++ show r |
1725 | return r | 1724 | return r |
1726 | 1725 | ||
1726 | , showKey = \key -> T.unpack key ++ ".tox" | ||
1727 | , setPolicy = \them -> case tkey them of | 1727 | , setPolicy = \them -> case tkey them of |
1728 | Just tk -> \p -> setPolicy tox tk p | 1728 | Just tk -> \p -> setPolicy tox tk p |
1729 | Nothing -> \p -> return () | 1729 | Nothing -> \p -> return () |
@@ -1745,6 +1745,7 @@ selectManager mtman tcp profile = case T.splitAt 43 profile of | |||
1745 | dput XMan $ "reverseAddress(tcp) " ++ show (profile,paddr) | 1745 | dput XMan $ "reverseAddress(tcp) " ++ show (profile,paddr) |
1746 | reverseAddress tcp paddr | 1746 | reverseAddress tcp paddr |
1747 | 1747 | ||
1748 | , showKey = showKey tcp | ||
1748 | , setPolicy = setPolicy tcp | 1749 | , setPolicy = setPolicy tcp |
1749 | , status = \k -> fmap XMPPStatus <$> status tcp k | 1750 | , status = \k -> fmap XMPPStatus <$> status tcp k |
1750 | , connections = connections tcp | 1751 | , connections = connections tcp |