2012-01-04 Ramon Novoa <rnovoa@artica.es>

* 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
This commit is contained in:
ramonn 2012-01-04 16:09:11 +00:00
parent 3ac4afcf0d
commit 0ff0bfb98f
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-01-04 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module.cc: Fixed an error when checking multiple
preconditions. Fixed precondition evaluation logic.
2012-01-03 Ramon Novoa <rnovoa@artica.es>
* pandora_windows_service.h,

View File

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