mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
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: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
parent
1679883a45
commit
b56c07a6a1
@ -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,
|
|||||||
*result = NULL;
|
*result = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = PRL_ERR_SUCCESS;
|
||||||
}
|
}
|
||||||
ret = PRL_ERR_SUCCESS;
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
PrlHandle_Free(job);
|
PrlHandle_Free(job);
|
||||||
|
Loading…
Reference in New Issue
Block a user