mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8652 from Icinga/bugfix/l_appversionint-0-8628
l_AppVersionInt: respect versions like r2.12.0, not just v2.12.0
This commit is contained in:
commit
f346a9eea4
lib/remote
|
@ -530,7 +530,7 @@ void ApiListener::NewClientHandler(
|
||||||
|
|
||||||
static const auto l_AppVersionInt (([]() -> unsigned long {
|
static const auto l_AppVersionInt (([]() -> unsigned long {
|
||||||
auto appVersion (Application::GetAppVersion());
|
auto appVersion (Application::GetAppVersion());
|
||||||
boost::regex rgx (R"EOF(^v?(\d+)\.(\d+)\.(\d+))EOF");
|
boost::regex rgx (R"EOF(^[rv]?(\d+)\.(\d+)\.(\d+))EOF");
|
||||||
boost::smatch match;
|
boost::smatch match;
|
||||||
|
|
||||||
if (!boost::regex_search(appVersion.GetData(), match, rgx)) {
|
if (!boost::regex_search(appVersion.GetData(), match, rgx)) {
|
||||||
|
|
Loading…
Reference in New Issue