X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FDeviceConfig.cc;h=66fe863be28c17766269f3203c88807d46ade757;hb=65f22bbea2531f7cd492d6108b8902f92b7750a8;hp=9b3a1007c7e6b7841ef3a3e1ba307a3226749f32;hpb=2cdc3f40842afe29f3ea07f11e52b1eb824dabd5;p=libplp.git diff --git a/src/DeviceConfig.cc b/src/DeviceConfig.cc index 9b3a100..66fe863 100644 --- a/src/DeviceConfig.cc +++ b/src/DeviceConfig.cc @@ -18,7 +18,8 @@ using namespace std; using namespace plp; -string DeviceConfig::store_base_dir = DEFAULT_STORAGE_BASE_DIR; +string DeviceConfig::store_base_dir = DEFAULT_STORAGE_BASE_DIR; +long DeviceConfig::read_interval_seconds = 600; ConfigHandle::ConfigHandle(uci_context *ctx_param, uci_package *pkg_param, @@ -202,6 +203,14 @@ void DeviceConfig::set_base_dir_name(string store_param) { } } +long DeviceConfig::get_read_interval_seconds() { + return read_interval_seconds; +} + +void DeviceConfig::set_read_interval_seconds(long seconds_param) { + read_interval_seconds = seconds_param; +} + string DeviceConfig::get_base_dir_name() { return store_base_dir; } @@ -324,12 +333,12 @@ ConfigHandle *DeviceConfig::load_device_config(string device_id_param) { } } else { - log_error("Failed to load device device configuration, memory allocation error.\n"); + log_error("Failed to load device configuration, memory allocation error.\n"); set_config_value(DEVICE_CONFIG_VALUE_KEY__TYPE, ""); } } else { - log_error("Failed to load device device configuration, file does not exist: %s.\n", cfg_fl.c_str()); + log_error("Failed to load device configuration, file does not exist: %s.\n", cfg_fl.c_str()); } } return ret_val;