|
|
@ -216,16 +216,17 @@ bool CConf::read()
|
|
|
|
} else if (section == SECTION_FCS_NETWORK) {
|
|
|
|
} else if (section == SECTION_FCS_NETWORK) {
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
if (::strcmp(key, "Enable") == 0)
|
|
|
|
m_fcsNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
m_fcsNetworkEnabled = ::atoi(value) == 1;
|
|
|
|
else if (::strcmp(key, "Entries") == 0) {
|
|
|
|
else if (::strcmp(key, "Entry") == 0) {
|
|
|
|
char* p = ::strtok(value, ",\r\n");
|
|
|
|
char* p1 = ::strtok(value, ",");
|
|
|
|
while (p != NULL) {
|
|
|
|
char* p2 = ::strtok(NULL, "\r\n");
|
|
|
|
if (::strlen(p) > 0U) {
|
|
|
|
if (p1 != NULL && p2 != NULL) {
|
|
|
|
for (unsigned int i = 0U; p[i] != 0; i++)
|
|
|
|
if (::strlen(p1) > 0U && ::strlen(p2) > 0U) {
|
|
|
|
p[i] = ::toupper(p[i]);
|
|
|
|
for (unsigned int i = 0U; p1[i] != 0; i++)
|
|
|
|
std::string name = std::string(p);
|
|
|
|
p1[i] = ::toupper(p1[i]);
|
|
|
|
m_fcsNetworkEntries.push_back(name);
|
|
|
|
std::string name = std::string(p1);
|
|
|
|
|
|
|
|
std::string desc = std::string(p2);
|
|
|
|
|
|
|
|
m_fcsNetworkEntries.push_back(std::make_pair(name, desc));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p = ::strtok(NULL, ",\r\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (::strcmp(key, "Port") == 0)
|
|
|
|
} else if (::strcmp(key, "Port") == 0)
|
|
|
|
m_fcsNetworkPort = (unsigned int)::atoi(value);
|
|
|
|
m_fcsNetworkPort = (unsigned int)::atoi(value);
|
|
|
@ -427,7 +428,7 @@ bool CConf::getFCSNetworkEnabled() const
|
|
|
|
return m_fcsNetworkEnabled;
|
|
|
|
return m_fcsNetworkEnabled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<std::string> CConf::getFCSNetworkEntries() const
|
|
|
|
std::vector<std::pair<std::string, std::string>> CConf::getFCSNetworkEntries() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return m_fcsNetworkEntries;
|
|
|
|
return m_fcsNetworkEntries;
|
|
|
|
}
|
|
|
|
}
|
|
|
|