Re: [PATCH 9/9] vz: don't fail unregister on sending event error

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

 




On 14.06.2016 11:46, Nikolay Shirokovskiy wrote:
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
> ---
>  src/vz/vz_sdk.c | 21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
> index 612a059..12691ba 100644
> --- a/src/vz/vz_sdk.c
> +++ b/src/vz/vz_sdk.c
> @@ -1669,21 +1669,19 @@ prlsdkUpdateDomain(vzDriverPtr driver, virDomainObjPtr dom)
>      return prlsdkLoadDomain(driver, pdom->sdkdom, dom) ? 0 : -1;
>  }
>  
> -static int prlsdkSendEvent(vzDriverPtr driver,
> -                           virDomainObjPtr dom,
> -                           virDomainEventType lvEventType,
> -                           int lvEventTypeDetails)
> +static void
> +prlsdkSendEvent(vzDriverPtr driver,
> +                virDomainObjPtr dom,
> +                virDomainEventType lvEventType,
> +                int lvEventTypeDetails)
>  {
> -    virObjectEventPtr event = NULL;
> +    virObjectEventPtr event;
>  
>      event = virDomainEventLifecycleNewFromObj(dom,
>                                                lvEventType,
>                                                lvEventTypeDetails);
>      if (!event)
> -        return -1;

Phhh, if (event) of course.

> -
> -    virObjectEventStateQueue(driver->domainEventState, event);
> -    return 0;
> +        virObjectEventStateQueue(driver->domainEventState, event);
>  }
>  
>  static void
> @@ -3887,9 +3885,8 @@ prlsdkUnregisterDomain(vzDriverPtr driver, virDomainObjPtr dom, unsigned int fla
>      for (i = 0; i < dom->def->nnets; i++)
>          prlsdkCleanupBridgedNet(driver, dom->def->nets[i]);
>  
> -    if (prlsdkSendEvent(driver, dom, VIR_DOMAIN_EVENT_UNDEFINED,
> -                        VIR_DOMAIN_EVENT_UNDEFINED_REMOVED) < 0)
> -        goto cleanup;
> +    prlsdkSendEvent(driver, dom, VIR_DOMAIN_EVENT_UNDEFINED,
> +                    VIR_DOMAIN_EVENT_UNDEFINED_REMOVED);
>  
>      virDomainObjListRemove(driver->domains, dom);
>  
> 

--
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]