From 0167f31845a56f4e1eda4035299d878b203fc633 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 4 Feb 2005 14:02:20 +0000 Subject: [PATCH] - added some default values (no longer explicitely required in the configuration file) - bugfix: read configuration values from the environment and not directly via Helm_registry --- helm/http_getter/main.ml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/helm/http_getter/main.ml b/helm/http_getter/main.ml index ed831c054..176383615 100644 --- a/helm/http_getter/main.ml +++ b/helm/http_getter/main.ml @@ -268,7 +268,7 @@ let callback (req: Http_types.request) outchan = | "/getdtd" -> Http_getter_cache.respond_dtd ~patch:(parse_patch req) ~url:(sprintf "%s/%s" - (Helm_registry.get "getter.dtd_dir") (req#param "uri")) + (Lazy.force Http_getter_env.dtd_dir) (req#param "uri")) outchan | "/resolve" -> return_resolve (req#param "uri") outchan | "/register" -> @@ -348,11 +348,7 @@ let callback (req: Http_types.request) outchan = let main () = Helm_registry.load_from configuration_file; - Http_getter_logger.set_log_level - (Helm_registry.get_opt_default Helm_registry.get_int 1 "getter.log_level"); - Http_getter_logger.set_log_file - (Helm_registry.get_opt Helm_registry.get_string "getter.log_file"); - Http_getter_env.reload (); + Http_getter.init (); print_string (Http_getter_env.env_to_string ()); flush stdout; let batch_update = @@ -365,7 +361,7 @@ let main () = Sys.catch_break true; try Http_daemon.start' ~mode:`Thread - ~timeout:(Some 600) ~port:(Helm_registry.get_int "getter.port") + ~timeout:(Some 600) ~port:(Lazy.force Http_getter_env.port) callback with Sys.Break -> () (* 'close_maps' already registered with 'at_exit' *) end -- 2.39.2