mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
IcingaDB: Fix enumeral mismatch compiler warnings
This fixes 3 enumeral mismatch compiler warnings when building the IcingaDB target.
This commit is contained in:
parent
2f82047737
commit
5930d640e4
@ -1237,7 +1237,7 @@ void IcingaDB::SendStatusUpdate(const ConfigObject::Ptr& object, const CheckResu
|
|||||||
if (!cr) {
|
if (!cr) {
|
||||||
hard_state = 99;
|
hard_state = 99;
|
||||||
} else {
|
} else {
|
||||||
hard_state = service ? service->GetLastHardState() : host->GetLastHardState();
|
hard_state = service ? Convert::ToLong(service->GetLastHardState()) : Convert::ToLong(host->GetLastHardState());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<String> xAdd ({
|
std::vector<String> xAdd ({
|
||||||
@ -1246,7 +1246,7 @@ void IcingaDB::SendStatusUpdate(const ConfigObject::Ptr& object, const CheckResu
|
|||||||
"environment_id", SHA1(GetEnvironment()),
|
"environment_id", SHA1(GetEnvironment()),
|
||||||
"host_id", GetObjectIdentifier(host),
|
"host_id", GetObjectIdentifier(host),
|
||||||
"state_type", Convert::ToString(type),
|
"state_type", Convert::ToString(type),
|
||||||
"soft_state", Convert::ToString(cr ? service ? cr->GetState() : Host::CalculateState(cr->GetState()) : 99),
|
"soft_state", Convert::ToString(cr ? service ? Convert::ToLong(cr->GetState()) : Convert::ToLong(Host::CalculateState(cr->GetState())) : 99),
|
||||||
"hard_state", Convert::ToString(hard_state),
|
"hard_state", Convert::ToString(hard_state),
|
||||||
"attempt", Convert::ToString(checkable->GetCheckAttempt()),
|
"attempt", Convert::ToString(checkable->GetCheckAttempt()),
|
||||||
"previous_soft_state", Convert::ToString(GetPreviousState(checkable, service, StateTypeSoft)),
|
"previous_soft_state", Convert::ToString(GetPreviousState(checkable, service, StateTypeSoft)),
|
||||||
@ -1322,7 +1322,7 @@ void IcingaDB::SendSentNotification(
|
|||||||
"notification_id", GetObjectIdentifier(notification),
|
"notification_id", GetObjectIdentifier(notification),
|
||||||
"host_id", GetObjectIdentifier(host),
|
"host_id", GetObjectIdentifier(host),
|
||||||
"type", Convert::ToString(type),
|
"type", Convert::ToString(type),
|
||||||
"state", Convert::ToString(service ? cr->GetState() : Host::CalculateState(cr->GetState())),
|
"state", Convert::ToString(service ? Convert::ToLong(cr->GetState()) : Convert::ToLong(Host::CalculateState(cr->GetState()))),
|
||||||
"previous_hard_state", Convert::ToString(GetPreviousState(checkable, service, StateTypeHard)),
|
"previous_hard_state", Convert::ToString(GetPreviousState(checkable, service, StateTypeHard)),
|
||||||
"author", Utility::ValidateUTF8(author),
|
"author", Utility::ValidateUTF8(author),
|
||||||
"text", Utility::ValidateUTF8(finalText),
|
"text", Utility::ValidateUTF8(finalText),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user