void ExternalCommandProcessor::ProcessFile(double, const std::vector<String>& arguments)
{
String file = arguments[0];
- bool del = Convert::ToBool(arguments[1]);
+ int del = Convert::ToLong(arguments[1]);
std::ifstream ifp;
ifp.exceptions(std::ifstream::badbit);
ifp.close();
- if (del)
+ if (del > 0)
(void) unlink(file.CStr());
}
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[5]);
+ int is_fixed = Convert::ToLong(arguments[4]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
<< "Creating downtime for service " << service->GetName();
(void) service->AddDowntime(arguments[7], arguments[8],
Convert::ToDouble(arguments[2]), Convert::ToDouble(arguments[3]),
- Convert::ToBool(arguments[4]), triggeredBy, Convert::ToDouble(arguments[6]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[6]));
}
void ExternalCommandProcessor::DelSvcDowntime(double, const std::vector<String>& arguments)
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
void ExternalCommandProcessor::DelHostDowntime(double, const std::vector<String>& arguments)
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
Log(LogNotice, "ExternalCommandProcessor")
<< "Creating downtime for service " << service->GetName();
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
}
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
}
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
<< "Creating downtime for service " << service->GetName();
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
}
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
<< "Creating downtime for host " << host->GetName();
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
}
String triggeredBy;
int triggeredByLegacy = Convert::ToLong(arguments[4]);
+ int is_fixed = Convert::ToLong(arguments[3]);
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
<< "Creating downtime for service " << service->GetName();
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
- Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+ Convert::ToBool(is_fixed), triggeredBy, Convert::ToDouble(arguments[5]));
}
}