More fixes.

This commit is contained in:
Gunnar Beutner 2012-06-24 16:36:46 +02:00
parent 65ecfc7d57
commit 1cffed4b43
2 changed files with 6 additions and 2 deletions

View File

@ -77,7 +77,9 @@ void NagiosCheckTask::CheckThreadProc(void)
if (!it->second->RunTask()) {
CheckTask::FinishTask(it->second);
it = tasks.erase(it);
prev = it;
it++;
tasks.erase(prev);
} else {
it++;
}
@ -138,7 +140,7 @@ bool NagiosCheckTask::RunTask(void)
status = _pclose(m_FP);
#else /* _MSC_VER */
if (m_UsePopen)
status = pclose(fp);
status = pclose(m_FP);
else
status = pclose_noshell(&m_PCloseArg);
#endif /* _MSC_VER */

View File

@ -27,7 +27,9 @@ private:
FILE *m_FP;
stringstream m_OutputStream;
bool m_UsePopen;
#ifndef _MSC_VER
popen_noshell_pass_to_pclose m_PCloseArg;
#endif /* _MSC_VER */
static boost::mutex m_Mutex;
static deque<NagiosCheckTask::Ptr> m_Tasks;