mirror of https://github.com/Icinga/icinga2.git
parent
5e9d9aea74
commit
1df13c792b
|
@ -134,8 +134,6 @@ String icinga::DiagnosticInformation(const std::exception& ex, bool verbose, Sta
|
||||||
{
|
{
|
||||||
std::ostringstream result;
|
std::ostringstream result;
|
||||||
|
|
||||||
const user_error *uex = dynamic_cast<const user_error *>(&ex);
|
|
||||||
|
|
||||||
String message = ex.what();
|
String message = ex.what();
|
||||||
|
|
||||||
if (message.IsEmpty())
|
if (message.IsEmpty())
|
||||||
|
@ -150,9 +148,10 @@ String icinga::DiagnosticInformation(const std::exception& ex, bool verbose, Sta
|
||||||
ShowCodeFragment(result, dex->GetDebugInfo());
|
ShowCodeFragment(result, dex->GetDebugInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const user_error *uex = dynamic_cast<const user_error *>(&ex);
|
||||||
const posix_error *pex = dynamic_cast<const posix_error *>(&ex);
|
const posix_error *pex = dynamic_cast<const posix_error *>(&ex);
|
||||||
|
|
||||||
if (!uex && verbose) {
|
if (!uex && !pex && verbose) {
|
||||||
const StackTrace *st = boost::get_error_info<StackTraceErrorInfo>(ex);
|
const StackTrace *st = boost::get_error_info<StackTraceErrorInfo>(ex);
|
||||||
|
|
||||||
if (st) {
|
if (st) {
|
||||||
|
|
|
@ -226,8 +226,8 @@ void Timer::AdjustTimers(double adjustment)
|
||||||
std::vector<Timer *> timers;
|
std::vector<Timer *> timers;
|
||||||
|
|
||||||
BOOST_FOREACH(Timer *timer, idx) {
|
BOOST_FOREACH(Timer *timer, idx) {
|
||||||
if (abs(now - (timer->m_Next + adjustment)) <
|
if (std::fabs(now - (timer->m_Next + adjustment)) <
|
||||||
abs(now - timer->m_Next)) {
|
std::fabs(now - timer->m_Next)) {
|
||||||
timer->m_Next += adjustment;
|
timer->m_Next += adjustment;
|
||||||
timers.push_back(timer);
|
timers.push_back(timer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ int WorkQueue::m_NextID = 1;
|
||||||
boost::thread_specific_ptr<WorkQueue *> l_ThreadWorkQueue;
|
boost::thread_specific_ptr<WorkQueue *> l_ThreadWorkQueue;
|
||||||
|
|
||||||
WorkQueue::WorkQueue(size_t maxItems, int threadCount)
|
WorkQueue::WorkQueue(size_t maxItems, int threadCount)
|
||||||
: m_ID(m_NextID++), m_MaxItems(maxItems), m_ThreadCount(threadCount), m_Spawned(false), m_Stopped(false),
|
: m_ID(m_NextID++), m_ThreadCount(threadCount), m_Spawned(false), m_MaxItems(maxItems), m_Stopped(false),
|
||||||
m_Processing(0)
|
m_Processing(0)
|
||||||
{
|
{
|
||||||
m_StatusTimer = new Timer();
|
m_StatusTimer = new Timer();
|
||||||
|
|
Loading…
Reference in New Issue