]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - PowerDns.hs
cosmetic
[pdns-pipe-nmc.git] / PowerDns.hs
index cb685dd4e96fadfb9e83359568365e46c5d7ddde..1c1e420c6e13c0c61d25e1dc98537933f802bad0 100644 (file)
@@ -63,5 +63,8 @@ pdnsParse ver s =
                                             })
       _                         -> Left $ "Unparseable PDNS Request: " ++ s
 
-pdnsOut :: RRType -> NmcDom -> String
-pdnsOut _ d = show d
+pdnsOut :: Int -> RRType -> Either String NmcDom -> String
+pdnsOut ver rrtype edom =
+  case edom of
+    Left  err -> "LOG Error: " ++ err ++ "\nFAIL\n"
+    Right dom -> "DATA\n" ++ (show dom) ++ "\nEND\n" --FIXME