mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
Also check/clean AuthKeys for whitespace
This commit is contained in:
parent
5a9e3a4a66
commit
ad31455d8f
1 changed files with 6 additions and 2 deletions
8
Conf.cpp
8
Conf.cpp
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue