]> git.stg.codes - stg.git/commitdiff
Ticket 26. The int AUTH_IA::Reload() function definition added.
authorElena Mamontova <helenh463@gmail.com>
Tue, 9 Feb 2016 16:11:29 +0000 (18:11 +0200)
committerElena Mamontova <helenh463@gmail.com>
Tue, 9 Feb 2016 16:11:29 +0000 (18:11 +0200)
projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp

index 9c8ae1af440b6de691830cc0e25d1604ae54ab56..1d126ae55a0ff8e2425b6cb0ad143882815f0f0f 100644 (file)
@@ -526,6 +526,24 @@ if (ret)
 return ret;
 }
 //-----------------------------------------------------------------------------
+int AUTH_IA::Reload()
+{
+AUTH_IA_SETTINGS newIaSettings;
+MODULE_SETTINGS newSettings = settings;
+if (newIaSettings.ParseSettings(newSettings))
+    {
+    STG_LOGGER & WriteServLog = GetStgLogger();
+    printfd(__FILE__, "AUTH_IA::Reload() - Failed to reload InetAccess.\n");
+    WriteServLog("AUTH_IA: Cannot reload InetAccess. Errors found.");
+    return -1;
+    }
+
+STG_LOGGER & WriteServLog = GetStgLogger();
+printfd(__FILE__, "AUTH_IA::Reload() -  Reloaded InetAccess successfully.\n");
+WriteServLog("AUTH_IA: Reloaded InetAccess successfully.");
+return 0;
+}
+//-----------------------------------------------------------------------------
 int AUTH_IA::PrepareNet()
 {
 struct sockaddr_in listenAddr;