mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
commit
cbd4c6d6ae
@ -42,10 +42,6 @@ using namespace icinga;
|
|||||||
REGISTER_TYPE(CompatLogger);
|
REGISTER_TYPE(CompatLogger);
|
||||||
REGISTER_SCRIPTFUNCTION(ValidateRotationMethod, &CompatLogger::ValidateRotationMethod);
|
REGISTER_SCRIPTFUNCTION(ValidateRotationMethod, &CompatLogger::ValidateRotationMethod);
|
||||||
|
|
||||||
CompatLogger::CompatLogger(void)
|
|
||||||
: m_LastRotation(0)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @threadsafety Always.
|
* @threadsafety Always.
|
||||||
*/
|
*/
|
||||||
|
@ -39,16 +39,12 @@ public:
|
|||||||
DECLARE_PTR_TYPEDEFS(CompatLogger);
|
DECLARE_PTR_TYPEDEFS(CompatLogger);
|
||||||
DECLARE_TYPENAME(CompatLogger);
|
DECLARE_TYPENAME(CompatLogger);
|
||||||
|
|
||||||
CompatLogger(void);
|
|
||||||
|
|
||||||
static void ValidateRotationMethod(const String& location, const Dictionary::Ptr& attrs);
|
static void ValidateRotationMethod(const String& location, const Dictionary::Ptr& attrs);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Start(void);
|
virtual void Start(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double m_LastRotation;
|
|
||||||
|
|
||||||
void WriteLine(const String& line);
|
void WriteLine(const String& line);
|
||||||
void Flush(void);
|
void Flush(void);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ using namespace icinga;
|
|||||||
int ThreadPool::m_NextID = 1;
|
int ThreadPool::m_NextID = 1;
|
||||||
|
|
||||||
ThreadPool::ThreadPool(int max_threads)
|
ThreadPool::ThreadPool(int max_threads)
|
||||||
: m_ID(m_NextID++), m_Stopped(false), m_MaxThreads(max_threads)
|
: m_ID(m_NextID++), m_MaxThreads(max_threads), m_Stopped(false)
|
||||||
{
|
{
|
||||||
if (m_MaxThreads != -1 && m_MaxThreads < sizeof(m_Queues) / sizeof(m_Queues[0]))
|
if (m_MaxThreads != -1 && m_MaxThreads < sizeof(m_Queues) / sizeof(m_Queues[0]))
|
||||||
m_MaxThreads = sizeof(m_Queues) / sizeof(m_Queues[0]);
|
m_MaxThreads = sizeof(m_Queues) / sizeof(m_Queues[0]);
|
||||||
|
@ -548,8 +548,6 @@ String CompatUtility::GetServiceNotificationNotificationOptions(const Service::P
|
|||||||
{
|
{
|
||||||
ASSERT(service->OwnsLock());
|
ASSERT(service->OwnsLock());
|
||||||
|
|
||||||
bool is_hostcheck = (service->GetHost()->GetCheckService() == service);
|
|
||||||
|
|
||||||
unsigned long notification_type_filter = 0;
|
unsigned long notification_type_filter = 0;
|
||||||
unsigned long notification_state_filter = 0;
|
unsigned long notification_state_filter = 0;
|
||||||
|
|
||||||
|
@ -86,8 +86,6 @@ std::pair<double, double> ScheduledDowntime::FindNextSegment(void)
|
|||||||
|
|
||||||
ObjectLock olock(ranges);
|
ObjectLock olock(ranges);
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, ranges) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, ranges) {
|
||||||
tm rangeref;
|
|
||||||
|
|
||||||
Dictionary::Ptr segment = LegacyTimePeriod::FindNextSegment(kv.first, kv.second, &reference);
|
Dictionary::Ptr segment = LegacyTimePeriod::FindNextSegment(kv.first, kv.second, &reference);
|
||||||
|
|
||||||
if (!segment)
|
if (!segment)
|
||||||
|
@ -285,6 +285,9 @@ void Service::ProcessCheckResult(const CheckResult::Ptr& cr, const String& autho
|
|||||||
recovery = false;
|
recovery = false;
|
||||||
|
|
||||||
switch (cr->GetState()) {
|
switch (cr->GetState()) {
|
||||||
|
case StateOK:
|
||||||
|
/* Nothing to do here. */
|
||||||
|
break;
|
||||||
case StateWarning:
|
case StateWarning:
|
||||||
SetLastStateWarning(Utility::GetTime());
|
SetLastStateWarning(Utility::GetTime());
|
||||||
break;
|
break;
|
||||||
|
@ -149,8 +149,10 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
|||||||
|
|
||||||
/* StaticGetFieldId */
|
/* StaticGetFieldId */
|
||||||
std::cout << "\t" << "static int StaticGetFieldId(const String& name)" << std::endl
|
std::cout << "\t" << "static int StaticGetFieldId(const String& name)" << std::endl
|
||||||
<< "\t" << "{" << std::endl
|
<< "\t" << "{" << std::endl;
|
||||||
<< "\t\t" << "int offset = ";
|
|
||||||
|
if (!klass.Fields.empty()) {
|
||||||
|
std::cout << "\t\t" << "int offset = ";
|
||||||
|
|
||||||
if (!klass.Parent.empty())
|
if (!klass.Parent.empty())
|
||||||
std::cout << "TypeImpl<" << klass.Parent << ">::StaticGetFieldCount()";
|
std::cout << "TypeImpl<" << klass.Parent << ">::StaticGetFieldCount()";
|
||||||
@ -158,6 +160,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
|||||||
std::cout << "0";
|
std::cout << "0";
|
||||||
|
|
||||||
std::cout << ";" << std::endl << std::endl;
|
std::cout << ";" << std::endl << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
std::map<int, std::vector<std::pair<int, std::string> > > jumptable;
|
std::map<int, std::vector<std::pair<int, std::string> > > jumptable;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user