On Tue, Oct 27, 2015 at 10:53:03AM +0000, Lisa Velden wrote:
> To stay in line with defaultPort and defaultHttpConf, I would also call it
> defaultFamily and defaultBind, rest LGTM.

I suggest the following interdiff.

commit 2610bd91321fe3137507b7e4ef24c7d5fe7bf49e
Author: Klaus Aehlig <[email protected]>
Date:   Tue Oct 27 14:25:05 2015 +0100

    Interdiff

diff --git a/src/Ganeti/Utils/Http.hs b/src/Ganeti/Utils/Http.hs
index 2267024..901d401 100644
--- a/src/Ganeti/Utils/Http.hs
+++ b/src/Ganeti/Utils/Http.hs
@@ -81,11 +81,11 @@ httpConfFromOpts daemon opts = do
   defaultPort <- withDefaultOnIOError standardPort
                  . liftM fromIntegral
                  $ getServicePortNumber name
-  defFamily <- Ssconf.getPrimaryIPFamily Nothing
-  let defBind = if defFamily == Ok Socket.AF_INET6 then "::" else "*"
+  defaultFamily <- Ssconf.getPrimaryIPFamily Nothing
+  let defaultBind = if defaultFamily == Ok Socket.AF_INET6 then "::" else "*"
   return .
     setPort (maybe defaultPort fromIntegral (optPort opts)) .
-    setBind (pack . fromMaybe defBind $ optBindAddress opts)
+    setBind (pack . fromMaybe defaultBind $ optBindAddress opts)
     $ defaultHttpConf accessLog errorLog
 
 

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to