From 0ff0bfb98fa18662f8ff57ec1f5537f72f85c370 Mon Sep 17 00:00:00 2001 From: ramonn Date: Wed, 4 Jan 2012 16:09:11 +0000 Subject: [PATCH] 2012-01-04 Ramon Novoa * modules/pandora_module.cc: Fixed an error when checking multiple preconditions. Fixed precondition evaluation logic. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5322 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/win32/ChangeLog | 5 +++++ pandora_agents/win32/modules/pandora_module.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index 4bc58422ff..ba879aed07 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,3 +1,8 @@ +2012-01-04 Ramon Novoa + + * modules/pandora_module.cc: Fixed an error when checking multiple + preconditions. Fixed precondition evaluation logic. + 2012-01-03 Ramon Novoa * pandora_windows_service.h, diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index 3ecab9e799..39e9dfd08d 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -1067,6 +1067,7 @@ Pandora_Module::evaluatePreconditions () { ResumeThread (pi.hThread); /*string output;*/ + output = ""; int tickbase = GetTickCount(); while ( (dwRet = WaitForSingleObject (pi.hProcess, 500)) != WAIT_ABANDONED ) { PeekNamedPipe (out_read, buffer, BUFSIZE, &read, &avail, NULL); @@ -1121,7 +1122,7 @@ Pandora_Module::evaluatePreconditions () { CloseHandle (new_stdout); CloseHandle (out_read); - if (evaluateCondition (output, double_output, precond) != 0) { + if (evaluateCondition (output, double_output, precond) == 0) { return 0; } }