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