changed format for interval specification in pingcheck.conf from "a...b" to "a..b"
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 21 May 2014 12:27:06 +0000 (14:27 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 21 May 2014 12:27:06 +0000 (14:27 +0200)
src/config/option/hostpingintervaloption.cpp

index b16a79d..b7aac17 100644 (file)
@@ -39,7 +39,7 @@ using I2n::Logger::GlobalLogger;
 // HostPingIntervalOption
 //-----------------------------------------------------------------------------
 
-const std::string range_separator = "...";
+const std::string range_separator = "..";
 const int failure_interval = 60;
 
 HostPingIntervalOption::HostPingIntervalOption() :
@@ -107,7 +107,8 @@ bool HostPingIntervalOption::parse(
                     // found separator --> chose interval value from interval
                     interval_part = I2n::trim(host_interval_str.substr(0, range_separator_pos));
                     host_interval_lower = boost::lexical_cast<int>(interval_part);
-                    interval_part = I2n::trim(host_interval_str.substr(range_separator_pos+3));
+                    interval_part = I2n::trim(host_interval_str.substr(
+                                  range_separator_pos + range_separator.length()));
                     host_interval_upper = boost::lexical_cast<int>(interval_part);
 
                     BOOST_ASSERT( (0 < host_interval_lower) &&
@@ -118,7 +119,7 @@ bool HostPingIntervalOption::parse(
                                                                      host_interval_upper);
 
                     GlobalLogger.info() << get_command_string() << "=" << host_interval
-                        << " from range " << host_interval_lower << "..." << host_interval_upper
+                        << " from range " << host_interval_lower << ".." << host_interval_upper
                         << endl;
                 }
                 host_item->set_interval_in_sec( host_interval );