From c5f0b4a88dc8fe3a8ec8382d0b388771a10086aa Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 9 Apr 2018 20:26:05 -0700 Subject: [PATCH] remote job submission: fix bug that caused spurious errors to be returned From Steve Clark --- html/user/submit_rpc_handler.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php index ad1b6c63a8..023e153de7 100644 --- a/html/user/submit_rpc_handler.php +++ b/html/user/submit_rpc_handler.php @@ -543,22 +543,22 @@ function n_outfiles($wu) { // error: function show_job_details($wu) { - if ($wu->error_mask && WU_ERROR_COULDNT_SEND_RESULT) { + if ($wu->error_mask & WU_ERROR_COULDNT_SEND_RESULT) { echo " couldnt_send_result\n"; } - if ($wu->error_mask && WU_ERROR_TOO_MANY_ERROR_RESULTS) { + if ($wu->error_mask & WU_ERROR_TOO_MANY_ERROR_RESULTS) { echo " too_many_error_results\n"; } - if ($wu->error_mask && WU_ERROR_TOO_MANY_SUCCESS_RESULTS) { + if ($wu->error_mask & WU_ERROR_TOO_MANY_SUCCESS_RESULTS) { echo " too_many_success_results\n"; } - if ($wu->error_mask && WU_ERROR_TOO_MANY_TOTAL_RESULTS) { + if ($wu->error_mask & WU_ERROR_TOO_MANY_TOTAL_RESULTS) { echo " too_many_total_results\n"; } - if ($wu->error_mask && WU_ERROR_CANCELLED) { + if ($wu->error_mask & WU_ERROR_CANCELLED) { echo " cancelled\n"; } - if ($wu->error_mask && WU_ERROR_NO_CANONICAL_RESULT) { + if ($wu->error_mask & WU_ERROR_NO_CANONICAL_RESULT) { echo " no_canonical_result\n"; } $results = BoincResult::enum("workunitid=$wu->id"); @@ -569,7 +569,7 @@ function show_job_details($wu) { $in_progress++; break; } - if ($wu->error_mask && $r->outcome == RESULT_OUTCOME_CLIENT_ERROR) { + if ($wu->error_mask && ($r->outcome == RESULT_OUTCOME_CLIENT_ERROR)) { echo " $r->exit_status\n"; } if ($r->id == $wu->canonical_resultid) {