X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=pdns-pipe-nmc.hs;h=82c320d63936a94883b7a776d24e76d66f4e695f;hp=79a17c0df1691d8d84ec2b5b43936bb05de70ff5;hb=8c8cc995d35f462dbfdb7279f7e6da9bf27b670b;hpb=1ee19d546701efde4b4b2f2f70bedae907a5266d diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index 79a17c0..82c320d 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -96,13 +96,13 @@ main = do forever $ do l <- getLine case pdnsParse ver l of - Left e -> putStrLn $ "FAIL\t" ++ e + Left e -> putStr $ pdnsReport e Right preq -> do case preq of PdnsRequestQ qname qtype id _ _ _ -> - queryNmc mgr cfg qname id >>= putStr . (pdnsOut ver qtype) + queryNmc mgr cfg qname id >>= putStr . (pdnsOut ver id qname qtype) PdnsRequestAXFR xfrreq -> - putStrLn ("FAIL\tNo support for AXFR " ++ xfrreq) + putStr $ pdnsReport ("No support for AXFR " ++ xfrreq) PdnsRequestPing -> putStrLn "END" -- for testing @@ -110,4 +110,4 @@ main = do ask str = do cfg <- readConfig confFile mgr <- newManager def - queryNmc mgr cfg str "test-req-id" >>= putStr . (pdnsOut 1 RRTypeANY) + queryNmc mgr cfg str "askid" >>= putStr . (pdnsOut 1 "askid" str RRTypeANY)