Also check/clean AuthKeys for whitespace

This commit is contained in:
phl0 2018-08-28 22:59:31 +02:00
parent 5a9e3a4a66
commit ad31455d8f
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -129,8 +129,12 @@ bool CConf::read()
m_dapnetAddress = value;
else if (::strcmp(key, "Port") == 0)
m_dapnetPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "AuthKey") == 0)
m_dapnetAuthKey = value;
else if (::strcmp(key, "AuthKey") == 0) {
for (int i=0; value[i]; i++) {
if (!isspace(value[i]))
m_dapnetAuthKey.insert(m_dapnetAuthKey.end(),1, value[i]);
}
}
else if (::strcmp(key, "Debug") == 0)
m_dapnetDebug = ::atoi(value) == 1;
}