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; } }