mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 05:04:30 +02:00
More fixes.
This commit is contained in:
parent
65ecfc7d57
commit
1cffed4b43
@ -77,7 +77,9 @@ void NagiosCheckTask::CheckThreadProc(void)
|
|||||||
|
|
||||||
if (!it->second->RunTask()) {
|
if (!it->second->RunTask()) {
|
||||||
CheckTask::FinishTask(it->second);
|
CheckTask::FinishTask(it->second);
|
||||||
it = tasks.erase(it);
|
prev = it;
|
||||||
|
it++;
|
||||||
|
tasks.erase(prev);
|
||||||
} else {
|
} else {
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
@ -138,7 +140,7 @@ bool NagiosCheckTask::RunTask(void)
|
|||||||
status = _pclose(m_FP);
|
status = _pclose(m_FP);
|
||||||
#else /* _MSC_VER */
|
#else /* _MSC_VER */
|
||||||
if (m_UsePopen)
|
if (m_UsePopen)
|
||||||
status = pclose(fp);
|
status = pclose(m_FP);
|
||||||
else
|
else
|
||||||
status = pclose_noshell(&m_PCloseArg);
|
status = pclose_noshell(&m_PCloseArg);
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
@ -27,7 +27,9 @@ private:
|
|||||||
FILE *m_FP;
|
FILE *m_FP;
|
||||||
stringstream m_OutputStream;
|
stringstream m_OutputStream;
|
||||||
bool m_UsePopen;
|
bool m_UsePopen;
|
||||||
|
#ifndef _MSC_VER
|
||||||
popen_noshell_pass_to_pclose m_PCloseArg;
|
popen_noshell_pass_to_pclose m_PCloseArg;
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
static boost::mutex m_Mutex;
|
static boost::mutex m_Mutex;
|
||||||
static deque<NagiosCheckTask::Ptr> m_Tasks;
|
static deque<NagiosCheckTask::Ptr> m_Tasks;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user