提交 b56c07a6 编写于 作者: D Dmitry Guryanov 提交者: Peter Krempa

parallels: fix getJobResultHelper

When PrlJob_GetRetCode sets second argument to
error value it means sdk function failed and we
must return error from getJobResultHelper.
Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
上级 1679883a
...@@ -161,6 +161,7 @@ getJobResultHelper(PRL_HANDLE job, unsigned int timeout, PRL_HANDLE *result, ...@@ -161,6 +161,7 @@ getJobResultHelper(PRL_HANDLE job, unsigned int timeout, PRL_HANDLE *result,
logPrlErrorHelper(retCode, filename, funcname, linenr); logPrlErrorHelper(retCode, filename, funcname, linenr);
PrlHandle_Free(err_handle); PrlHandle_Free(err_handle);
ret = retCode;
} else { } else {
ret = PrlJob_GetResult(job, result); ret = PrlJob_GetResult(job, result);
if (PRL_FAILED(ret)) { if (PRL_FAILED(ret)) {
...@@ -169,8 +170,9 @@ getJobResultHelper(PRL_HANDLE job, unsigned int timeout, PRL_HANDLE *result, ...@@ -169,8 +170,9 @@ getJobResultHelper(PRL_HANDLE job, unsigned int timeout, PRL_HANDLE *result,
*result = NULL; *result = NULL;
goto cleanup; goto cleanup;
} }
ret = PRL_ERR_SUCCESS;
} }
ret = PRL_ERR_SUCCESS;
cleanup: cleanup:
PrlHandle_Free(job); PrlHandle_Free(job);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册