mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
Fix RemoteSyslogChannel setProperty value check (#4339)
We compare just 4 first letters. So if value would have example be syslevel then this function would work wrong. Nothing major but nice to fix. Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
parent
10f41c06d9
commit
46759cab03
@ -176,7 +176,7 @@ void RemoteSyslogChannel::setProperty(const std::string& name, const std::string
|
|||||||
std::string facility;
|
std::string facility;
|
||||||
if (Poco::icompare(value, 4, "LOG_") == 0)
|
if (Poco::icompare(value, 4, "LOG_") == 0)
|
||||||
facility = Poco::toUpper(value.substr(4));
|
facility = Poco::toUpper(value.substr(4));
|
||||||
else if (Poco::icompare(value, 4, "SYSLOG_") == 0)
|
else if (Poco::icompare(value, 7, "SYSLOG_") == 0)
|
||||||
facility = Poco::toUpper(value.substr(7));
|
facility = Poco::toUpper(value.substr(7));
|
||||||
else
|
else
|
||||||
facility = Poco::toUpper(value);
|
facility = Poco::toUpper(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user