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;
|
||||
|
||||
const user_error *uex = dynamic_cast<const user_error *>(&ex);
|
||||
|
||||
String message = ex.what();
|
||||
|
||||
if (message.IsEmpty())
|
||||
|
@ -150,9 +148,10 @@ String icinga::DiagnosticInformation(const std::exception& ex, bool verbose, Sta
|
|||
ShowCodeFragment(result, dex->GetDebugInfo());
|
||||
}
|
||||
|
||||
const user_error *uex = dynamic_cast<const user_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);
|
||||
|
||||
if (st) {
|
||||
|
|
|
@ -226,8 +226,8 @@ void Timer::AdjustTimers(double adjustment)
|
|||
std::vector<Timer *> timers;
|
||||
|
||||
BOOST_FOREACH(Timer *timer, idx) {
|
||||
if (abs(now - (timer->m_Next + adjustment)) <
|
||||
abs(now - timer->m_Next)) {
|
||||
if (std::fabs(now - (timer->m_Next + adjustment)) <
|
||||
std::fabs(now - timer->m_Next)) {
|
||||
timer->m_Next += adjustment;
|
||||
timers.push_back(timer);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ int WorkQueue::m_NextID = 1;
|
|||
boost::thread_specific_ptr<WorkQueue *> l_ThreadWorkQueue;
|
||||
|
||||
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_StatusTimer = new Timer();
|
||||
|
|
Loading…
Reference in New Issue