]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp
Code deduplication
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / rpcconfig.cpp
index 6d09a2d218bab194ef9d7c5c766575ada89978cf..8afbd9cdda8f1bf8acab5880f1c5e625956a495e 100644 (file)
@@ -1,16 +1,17 @@
+#include <unistd.h> // TODO: usleep
+
 #include <cstdlib>
 #include <csignal>
 
 #include <vector>
 #include <algorithm>
 
 #include <cstdlib>
 #include <csignal>
 
 #include <vector>
 #include <algorithm>
 
-#include "rpcconfig.h"
-
-#include "common.h"
-#include "admin.h"
-#include "module_settings.h"
-#include "settings.h"
+#include "stg/common.h"
+#include "stg/admin.h"
+#include "stg/module_settings.h"
+#include "stg/settings.h"
 
 
+#include "rpcconfig.h"
 #include "info_methods.h"
 #include "users_methods.h"
 #include "tariffs_methods.h"
 #include "info_methods.h"
 #include "users_methods.h"
 #include "tariffs_methods.h"
@@ -46,24 +47,6 @@ RPC_CONFIG_SETTINGS::RPC_CONFIG_SETTINGS()
 {
 }
 
 {
 }
 
-int RPC_CONFIG_SETTINGS::ParseIntInRange(const std::string & str,
-                                         int min,
-                                         int max,
-                                         int * val)
-{
-if (str2x(str.c_str(), *val))
-    {
-    errorStr = "Incorrect value \'" + str + "\'.";
-    return -1;
-    }
-if (*val < min || *val > max)
-    {
-    errorStr = "Value \'" + str + "\' out of range.";
-    return -1;
-    }
-return 0;
-}
-
 int RPC_CONFIG_SETTINGS::ParseSettings(const MODULE_SETTINGS & s)
 {
 int p;
 int RPC_CONFIG_SETTINGS::ParseSettings(const MODULE_SETTINGS & s)
 {
 int p;