-int ParseIntInRange(const string & value, int min, int max, int * val)
+int ParseIntInRange(const std::string & value, int min, int max, int * val)
-int ParseUnsignedInRange(const string & value, unsigned min, unsigned max, unsigned * val)
+int ParseUnsignedInRange(const std::string & value, unsigned min, unsigned max, unsigned * val)
else if (strcasecmp(node->getName(), "ServerName") == 0)
serverName = node->getValue(0);
else if (strcasecmp(node->getName(), "ServerPort") == 0)
else if (strcasecmp(node->getName(), "ServerName") == 0)
serverName = node->getValue(0);
else if (strcasecmp(node->getName(), "ServerPort") == 0)
if (ParseIntInRange(node->getValue(0), 1, 65535, &port))
{
strError = "Parameter 'ServerPort' is not valid.";
printfd(__FILE__, "SETTINGS::ReadSettings() - %s\n", strError.c_str());
return -1;
}
if (ParseIntInRange(node->getValue(0), 1, 65535, &port))
{
strError = "Parameter 'ServerPort' is not valid.";
printfd(__FILE__, "SETTINGS::ReadSettings() - %s\n", strError.c_str());
return -1;
}
if (ParseIntInRange(node->getValue(0), 0, 65535, &localPort))
{
strError = "Parameter 'LocalPort' is not valid.";
printfd(__FILE__, "SETTINGS::ReadSettings() - %s\n", strError.c_str());
return -1;
}
if (ParseIntInRange(node->getValue(0), 0, 65535, &localPort))
{
strError = "Parameter 'LocalPort' is not valid.";
printfd(__FILE__, "SETTINGS::ReadSettings() - %s\n", strError.c_str());
return -1;
}