From 2414a023332b32f29ba6d3086ead2d2a34a0401a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sat, 20 Dec 2014 01:21:01 +0100 Subject: [PATCH] Load settings from config INI file instead of using hardcoded values --- src/nine_q.adb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/nine_q.adb b/src/nine_q.adb index 361c016..004df67 100644 --- a/src/nine_q.adb +++ b/src/nine_q.adb @@ -1,5 +1,5 @@ with AWS.Config; -with AWS.Config.Set; +with AWS.Config.Ini; with AWS.Server; with Handlers; @@ -8,13 +8,7 @@ procedure Nine_Q is Server_Config: AWS.Config.Object; Web_Server: AWS.Server.HTTP; begin - Server_Config := AWS.Config.Get_Current; - AWS.Config.Set.Session(Server_Config, True); - AWS.Config.Set.Server_Host(Server_Config, "localhost"); - AWS.Config.Set.Server_Port(Server_Config, 18400); - - AWS.Config.Set.Session_Lifetime(1800.0); - AWS.Config.Set.Session_Cleanup_Interval(3600.0); + AWS.Config.Ini.Read(Server_Config, "nine_q_config.ini"); AWS.Server.Start(Web_Server => Web_Server, Dispatcher => Handlers.Get_Dispatchers, -- 2.43.5