Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-08-07 Thread Daniel P . Berrangé
On Tue, Aug 07, 2018 at 06:40:46PM +0200, Marc Hartmayer wrote: > On Wed, Jun 13, 2018 at 10:22 AM +0200, Marc Hartmayer > wrote: > > On Mon, Jun 04, 2018 at 06:25 PM +0200, "Daniel P. Berrangé" > > wrote: > >> On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: > > […snip…] > > >> >

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-08-07 Thread Marc Hartmayer
On Wed, Jun 13, 2018 at 10:22 AM +0200, Marc Hartmayer wrote: > On Mon, Jun 04, 2018 at 06:25 PM +0200, "Daniel P. Berrangé" > wrote: >> On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: […snip…] >> >> If the application wants to access 'opaque' outside the context of the >> callba

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-13 Thread Marc Hartmayer
On Mon, Jun 04, 2018 at 06:25 PM +0200, "Daniel P. Berrangé" wrote: > On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: >> >> >> On 04/26/2018 12:09 PM, Marc Hartmayer wrote: >> > On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan >> > wrote: >> >> On 04/12/2018 08:40 AM, Marc Hartm

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-04 Thread Daniel P . Berrangé
On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: > > > On 04/26/2018 12:09 PM, Marc Hartmayer wrote: > > On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan > > wrote: > >> On 04/12/2018 08:40 AM, Marc Hartmayer wrote: > >>> The commit 'close callback: move it to driver' (88f09b75eb

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-04 Thread John Ferlan
[...] >> >> True virsh uses NULL so it's fine; however, I was thinking about more >> generically - why would a Register routine with a callback to free >> memory free the memory upon successful register. >> >> I'm still not sure I understand why the API cannot return a failure, but >> Daniel says

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-03 Thread Marc Hartmayer
On Fri, Apr 27, 2018 at 02:16 AM +0200, John Ferlan wrote: > On 04/26/2018 12:09 PM, Marc Hartmayer wrote: >> On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan >> wrote: >>> On 04/12/2018 08:40 AM, Marc Hartmayer wrote: The commit 'close callback: move it to driver' (88f09b75eb99) moved >

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-04-26 Thread John Ferlan
On 04/26/2018 12:09 PM, Marc Hartmayer wrote: > On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan > wrote: >> On 04/12/2018 08:40 AM, Marc Hartmayer wrote: >>> The commit 'close callback: move it to driver' (88f09b75eb99) moved >>> the responsibility for the close callback to the driver. But

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-04-26 Thread Marc Hartmayer
On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan wrote: > On 04/12/2018 08:40 AM, Marc Hartmayer wrote: >> The commit 'close callback: move it to driver' (88f09b75eb99) moved >> the responsibility for the close callback to the driver. But if the >> driver doesn't support the connectRegisterClos

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-04-26 Thread John Ferlan
On 04/12/2018 08:40 AM, Marc Hartmayer wrote: > The commit 'close callback: move it to driver' (88f09b75eb99) moved > the responsibility for the close callback to the driver. But if the > driver doesn't support the connectRegisterCloseCallback API this > function does nothing, even no unsupported

[libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-04-12 Thread Marc Hartmayer
The commit 'close callback: move it to driver' (88f09b75eb99) moved the responsibility for the close callback to the driver. But if the driver doesn't support the connectRegisterCloseCallback API this function does nothing, even no unsupported error report. This behavior may lead to problems, for e