aboutsummaryrefslogtreecommitdiff
path: root/Utility/SRV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 07:51:18 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 07:51:18 -0400
commit86648b502149d32ee0f9af200e949e8240208a8c (patch)
treedb2529da7fbe58567680a3892f9a3e94a921a388 /Utility/SRV.hs
parent150b128f34b3c83ef1b227e4da94354c89c2e10d (diff)
remove unused support for ADNS library
Diffstat (limited to 'Utility/SRV.hs')
-rw-r--r--Utility/SRV.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/Utility/SRV.hs b/Utility/SRV.hs
index b6d57dea5..991f3a3d6 100644
--- a/Utility/SRV.hs
+++ b/Utility/SRV.hs
@@ -1,7 +1,6 @@
{- SRV record lookup
-
- - Uses either the ADNS Haskell library, or the standalone Haskell DNS
- - package, or the host command.
+ - Uses either the the standalone Haskell DNS package, or the host command.
-
- Copyright 2012 Joey Hess <id@joeyh.name>
-
@@ -29,16 +28,11 @@ import Data.Maybe
import Control.Applicative
import Prelude
-#ifdef WITH_ADNS
-import ADNS.Resolver
-import Data.Either
-#else
#ifdef WITH_DNS
import qualified Network.DNS.Lookup as DNS
import Network.DNS.Resolver
import qualified Data.ByteString.UTF8 as B8
#endif
-#endif
newtype SRV = SRV String
deriving (Show, Eq)
@@ -58,12 +52,6 @@ mkSRVTcp = mkSRV "tcp"
-
- On error, returns an empty list. -}
lookupSRV :: SRV -> IO [HostPort]
-#ifdef WITH_ADNS
-lookupSRV (SRV srv) = initResolver [] $ \resolver -> do
- r <- catchDefaultIO (Right []) $
- resolveSRV resolver srv
- return $ either (\_ -> []) id r
-#else
#ifdef WITH_DNS
lookupSRV (SRV srv) = do
seed <- makeResolvSeed defaultResolvConf
@@ -83,7 +71,6 @@ lookupSRV (SRV srv) = do
#else
lookupSRV = lookupSRVHost
#endif
-#endif
lookupSRVHost :: SRV -> IO [HostPort]
lookupSRVHost (SRV srv) = catchDefaultIO [] $