X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=pdns-pipe-nmc.hs;h=603ea987356ca793de89e94b27cad172a02eb918;hp=50d4bd860f8aa78e485825cf4e5eecb6d8befe77;hb=7350de03fb105bb8f46e96160bcb32fc75f04d61;hpb=0d59aa176c8ca6665f59426a436671099a393d3f diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index 50d4bd8..603ea98 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -55,8 +55,6 @@ qRsp rsp = -- NMC interface -descend subdom dom = dom --FIXME - queryNmc :: Manager -> Config -> String -> String -> IO (Either String NmcDom) queryNmc mgr cfg fqdn qid = do @@ -66,7 +64,7 @@ queryNmc mgr cfg fqdn qid = do httpLbs (qReq cfg (L.pack ("d/" ++ dn)) (L.pack qid)) mgr return $ case qRsp rsp of Left err -> Left err - Right dom -> Right $ descend xs dom + Right dom -> Right $ descendNmc xs dom _ -> return $ Left "Only \".bit\" domain is supported" @@ -100,7 +98,7 @@ main = do Right preq -> do case preq of PdnsRequestQ qname qtype id _ _ _ -> - queryNmc mgr cfg qname id >>= putStr . (pdnsOut ver id qtype) + queryNmc mgr cfg qname id >>= putStr . (pdnsOut ver id qname qtype) PdnsRequestAXFR xfrreq -> putStr $ pdnsReport ("No support for AXFR " ++ xfrreq) PdnsRequestPing -> putStrLn "END" @@ -110,4 +108,4 @@ main = do ask str = do cfg <- readConfig confFile mgr <- newManager def - queryNmc mgr cfg str "askid" >>= putStr . (pdnsOut 1 "askid" RRTypeANY) + queryNmc mgr cfg str "askid" >>= putStr . (pdnsOut 1 "askid" str RRTypeANY)