when additional information is asked PrlJob_GetError an error
PRL_ERR_NO_DATA should not be treated as error
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/vz/vz_sdk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 7fc7d97..bad4ddd 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -162,7 +162,8 @@ getJobResultHelper(PRL_HANDLE job, unsigned int timeout, PRL_HANDLE
*result,
PRL_HANDLE err_handle;
/* Sometimes it's possible to get additional error info. */
- if ((ret = PrlJob_GetError(job, &err_handle))) {
+ ret = PrlJob_GetError(job, &err_handle);
+ if (ret && ret != PRL_ERR_NO_DATA) {
logPrlErrorHelper(ret, filename, funcname, linenr);
goto cleanup;
}
--
1.8.3.1