]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/SystemConfig.hs
merge branch origin/master
[Rakka.git] / Rakka / SystemConfig.hs
index 029d307ca2757560c413fd024e5ad1b348a82ad9..d15bc9d99a0f2bc6edb65ed467b62631d9e6a964 100644 (file)
@@ -230,9 +230,14 @@ instance SysConfValue BaseURI where
     defaultValue sc
         = let conf = scLucuConf sc
               host = C8.unpack $ LC.cnfServerHost conf
-              port = unsafePerformIO ∘ getServicePortNumber $ LC.cnfServerPort conf
+              port = unsafePerformIO $
+                     do ent <- getServiceByName (LC.cnfServerPort conf) "tcp"
+                        return (servicePort ent)
+              -- FIXME: There should be a way to change configurations
+              -- without web interface nor direct repository
+              -- modification.
               defaultURI
-                  = "http://" ++ host ++ -- FIXME: consider IPv6 address
+                  = "http://" ++ host ++
                     (if port == 80
                      then ""
                      else ':' : show port) ++ "/"