diff options
author | Kazu Yamamoto <kazu@iij.ad.jp> | 2011-10-24 13:40:01 +0900 |
---|---|---|
committer | Kazu Yamamoto <kazu@iij.ad.jp> | 2011-10-24 13:40:01 +0900 |
commit | 6dc94202a991b716be72acdc5cee367b2e8ef081 (patch) | |
tree | f897381218636d611e76f8c936a0c1776903fcc3 | |
parent | 04c4afa6f7af8be5bd9ac0871ac42510350ac2f0 (diff) |
hlint.
-rw-r--r-- | SimpleServer.hs | 4 | ||||
-rw-r--r-- | TestProtocol.hs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/SimpleServer.hs b/SimpleServer.hs index b01d864..401e7f4 100644 --- a/SimpleServer.hs +++ b/SimpleServer.hs @@ -48,7 +48,7 @@ proxyRequest Conf{..} rc req = do parseResponse responseEnum responseIter rs <- makeResolvSeed rc - withResolver rs $ \r -> do + withResolver rs $ \r -> (>>= check) <$> timeout' "proxy timeout" timeOut (worker r) where ident = identifier . header $ req @@ -59,7 +59,7 @@ proxyRequest Conf{..} rc req = do else trace "identifier not match" Nothing {-- - - 先尝试本地查询,查询不到就代理到真正的dns服务器 + - TBD --} handleRequest :: Conf -> ResolvConf -> DNSFormat -> IO (Maybe DNSFormat) handleRequest conf rc req = maybe (proxyRequest conf rc req) (trace "return A record" $ return . Just) mresponse diff --git a/TestProtocol.hs b/TestProtocol.hs index cef00ee..ee839d9 100644 --- a/TestProtocol.hs +++ b/TestProtocol.hs @@ -7,7 +7,6 @@ import Network.DNS.Internal import Network.DNS.Query import Network.DNS.Response import Data.IP -import Control.Monad.State import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) @@ -17,7 +16,7 @@ tests = [ testGroup "Test case" [ testCase "QueryA" (test_Format testQueryA) , testCase "QueryAAAA" (test_Format testQueryAAAA) - , testCase "ResponseA" (test_Format $ testResponseA) + , testCase "ResponseA" (test_Format testResponseA) ] ] |