diff options
author | jim@bo <jim@bo> | 2018-06-20 22:40:37 -0400 |
---|---|---|
committer | jim@bo <jim@bo> | 2018-06-20 22:43:47 -0400 |
commit | 825962518c6ad00279fc23e8e1dec746980e483f (patch) | |
tree | 68c135bdffd879835c48cce3d397e8edf99b53f4 /Presence/DNSCache.hs | |
parent | 09aa079fbab069f177e08b5239bf684d312eb00a (diff) |
More DPut stuff
* verbose/quiet without args shows report
* verbose all - sets all tags verbose
* quiet all - sets all tags quiet
* XMisc defaults to verbose, everything else quiet
* new XMan tag for ToxManager related stuff
* s/hputStrLn stderr/dput XMisc/ in daemon code
Diffstat (limited to 'Presence/DNSCache.hs')
-rw-r--r-- | Presence/DNSCache.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Presence/DNSCache.hs b/Presence/DNSCache.hs index aaf1a7be..afcc227c 100644 --- a/Presence/DNSCache.hs +++ b/Presence/DNSCache.hs | |||
@@ -50,6 +50,7 @@ import SockAddr () | |||
50 | import ControlMaybe ( handleIO_ ) | 50 | import ControlMaybe ( handleIO_ ) |
51 | import GetHostByAddr ( getHostByAddr ) | 51 | import GetHostByAddr ( getHostByAddr ) |
52 | import InterruptibleDelay | 52 | import InterruptibleDelay |
53 | import DPut | ||
53 | 54 | ||
54 | type TimeStamp = UTCTime | 55 | type TimeStamp = UTCTime |
55 | 56 | ||
@@ -106,7 +107,7 @@ make6mapped4 addr@(SockAddrInet port a) = SockAddrInet6 port 0 (0,0,0xFFFF,fromB | |||
106 | 107 | ||
107 | tryForkOS :: IO () -> IO ThreadId | 108 | tryForkOS :: IO () -> IO ThreadId |
108 | tryForkOS action = catchIOError (forkOS action) $ \e -> do | 109 | tryForkOS action = catchIOError (forkOS action) $ \e -> do |
109 | hPutStrLn stderr $ "DNSCache: Link with -threaded to avoid excessively long time-out." | 110 | dput XMisc $ "DNSCache: Link with -threaded to avoid excessively long time-out." |
110 | forkIO action | 111 | forkIO action |
111 | 112 | ||
112 | 113 | ||
@@ -152,7 +153,7 @@ strip_brackets s = | |||
152 | 153 | ||
153 | reportTimeout :: forall a. Show a => a -> IO () | 154 | reportTimeout :: forall a. Show a => a -> IO () |
154 | reportTimeout addrtext = do | 155 | reportTimeout addrtext = do |
155 | hPutStrLn stderr $ "timeout resolving: "++show addrtext | 156 | dput XMisc $ "timeout resolving: "++show addrtext |
156 | -- killThread rt | 157 | -- killThread rt |
157 | 158 | ||
158 | unmap6mapped4 :: SockAddr -> SockAddr | 159 | unmap6mapped4 :: SockAddr -> SockAddr |