Re: [PATCH 3/4] vz: fix getJobResultHelper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 26.05.2016 13:14, Maxim Nestratov wrote:
> 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@xxxxxxxxxxxxx>
> ---
>  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;
>          }
> 

I would log and return in case of PRL_ERR_NO_DATA or it is rather compilicated
to call logPrlEventErrorHelper only to return immediately.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]