]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
Ticket 26. The int AUTH_IA::Reload() function definition added.
[stg.git] / 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;