diff options
author | Joe Crayne <joe@jerkface.net> | 2018-07-05 22:41:08 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-07-05 22:41:22 -0400 |
commit | 95d6ae45e07707eb93f083ecf02d8f0df0015496 (patch) | |
tree | 96307f685d0ac63eacc22bc411abf387f358f09a | |
parent | 3e451443ea432a0c5c3ed1f85953188529c1a754 (diff) |
cli: sessions command shows addresses.
-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 fff7a98b..2b4de91e 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -692,7 +692,7 @@ clientSession s@Session{..} sock cnum h = do | |||
692 | -> cmd0 $ do | 692 | -> cmd0 $ do |
693 | sessions <- concat . Map.elems <$> (atomically $ readTVar (Tox.netCryptoSessionsByKey cryptosessions)) | 693 | sessions <- concat . Map.elems <$> (atomically $ readTVar (Tox.netCryptoSessionsByKey cryptosessions)) |
694 | let sessionsReport = mapM showPerSession sessions | 694 | let sessionsReport = mapM showPerSession sessions |
695 | headers = ["SessionID", "YourKey", "TheirKey", "NextMsg", "Dropped" {-,"Handled","Unhandled" -} | 695 | headers = ["SessionID", "YourKey", "TheirKey", "Address", "NextMsg", "Dropped" {-,"Handled","Unhandled" -} |
696 | ,"Progress" ] | 696 | ,"Progress" ] |
697 | showPerSession (Tox.NCrypto | 697 | showPerSession (Tox.NCrypto |
698 | { ncState = progressVar | 698 | { ncState = progressVar |
@@ -709,8 +709,9 @@ clientSession s@Session{..} sock cnum h = do | |||
709 | countHandled = length h | 709 | countHandled = length h |
710 | countUnhandled = length u | 710 | countUnhandled = length u |
711 | return [ printf "%x" id -- "SessionID" | 711 | return [ printf "%x" id -- "SessionID" |
712 | , show (Tox.key2id yourkey) -- "YourKey" | 712 | , take 8 $ show (Tox.key2id yourkey) -- "YourKey" |
713 | , show (Tox.key2id theirkey)-- "TheirKey" | 713 | , show (Tox.key2id theirkey)-- "TheirKey" |
714 | , drop 11 $ show sockAddr -- "Address" | ||
714 | , show num -- "NextMsg" | 715 | , show num -- "NextMsg" |
715 | , show dropped -- "Dropped" | 716 | , show dropped -- "Dropped" |
716 | -- , show countHandled -- "Handled" | 717 | -- , show countHandled -- "Handled" |