Simplify the format of the XLX Hosts file a little.

This commit is contained in:
Jonathan Naylor
2017-09-26 14:58:22 +01:00
parent 82ce7a32f3
commit 2159abb418
9 changed files with 167 additions and 142 deletions

View File

@@ -59,17 +59,13 @@ bool CReflectors::load()
char* p1 = ::strtok(buffer, ";\r\n");
char* p2 = ::strtok(NULL, ";\r\n");
char* p3 = ::strtok(NULL, ";\r\n");
char* p4 = ::strtok(NULL, ";\r\n");
char* p5 = ::strtok(NULL, "\r\n");
char* p3 = ::strtok(NULL, "\r\n");
if (p1 != NULL && p2 != NULL && p3 != NULL && p4 != NULL && p5 != NULL) {
if (p1 != NULL && p2 != NULL && p3 != NULL) {
CReflector* refl = new CReflector;
refl->m_id = (unsigned int)::atoi(p1);
refl->m_address = std::string(p2);
refl->m_port = (unsigned int)::atoi(p3);
refl->m_startup = (unsigned int)::atoi(p4);
refl->m_password = std::string(p5);
refl->m_startup = (unsigned int)::atoi(p3);
m_reflectors.push_back(refl);
}
}