summaryrefslogtreecommitdiff
path: root/Presence/DNSCache.hs
diff options
context:
space:
mode:
authorjim@bo <jim@bo>2018-06-20 22:40:37 -0400
committerjim@bo <jim@bo>2018-06-20 22:43:47 -0400
commit825962518c6ad00279fc23e8e1dec746980e483f (patch)
tree68c135bdffd879835c48cce3d397e8edf99b53f4 /Presence/DNSCache.hs
parent09aa079fbab069f177e08b5239bf684d312eb00a (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.hs5
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 ()
50import ControlMaybe ( handleIO_ ) 50import ControlMaybe ( handleIO_ )
51import GetHostByAddr ( getHostByAddr ) 51import GetHostByAddr ( getHostByAddr )
52import InterruptibleDelay 52import InterruptibleDelay
53import DPut
53 54
54type TimeStamp = UTCTime 55type TimeStamp = UTCTime
55 56
@@ -106,7 +107,7 @@ make6mapped4 addr@(SockAddrInet port a) = SockAddrInet6 port 0 (0,0,0xFFFF,fromB
106 107
107tryForkOS :: IO () -> IO ThreadId 108tryForkOS :: IO () -> IO ThreadId
108tryForkOS action = catchIOError (forkOS action) $ \e -> do 109tryForkOS 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
153reportTimeout :: forall a. Show a => a -> IO () 154reportTimeout :: forall a. Show a => a -> IO ()
154reportTimeout addrtext = do 155reportTimeout addrtext = do
155 hPutStrLn stderr $ "timeout resolving: "++show addrtext 156 dput XMisc $ "timeout resolving: "++show addrtext
156 -- killThread rt 157 -- killThread rt
157 158
158unmap6mapped4 :: SockAddr -> SockAddr 159unmap6mapped4 :: SockAddr -> SockAddr