[libvirt] [libvirt-php][PATCH 7/7] libvirt_stream_close: Pass the actual connect object

Michal Novotny mignov at gmail.com
Fri Jun 19 17:36:34 UTC 2015


Nice work & catch. Thanks,
Michal
Dne 19.6.2015 18:49 "Eric Blake" <eblake at redhat.com> napsal(a):

> On 06/19/2015 03:17 AM, Michal Privoznik wrote:
> > There's a bug in the function. When closing a stream, the stream
> > refcount should be decremented. We have a helper function for that
> > which (among others) take a virConnectPtr as an argument. However,
> > we are passing an internal representation of the virConnect.
> > Even gcc warns about this:
> >
> > libvirt-php.c: In function ‘zif_libvirt_stream_close’:
> > libvirt-php.c:3748:47: warning: passing argument 2 of
> ‘resource_change_counter’ from incompatible pointer type
> >   resource_change_counter(INT_RESOURCE_STREAM, stream->conn,
> stream->stream, 0 TSRMLS_CC);
> >                                                ^
> > libvirt-php.c:470:5: note: expected ‘virConnectPtr’ but argument is of
> type ‘struct php_libvirt_connection *’
> >  int resource_change_counter(int type, virConnectPtr conn, void *memp,
> int inc TSRMLS_DC)
> >      ^
> > Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> >
> > Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>
> Double S-o-b looks odd.
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150619/3db35f03/attachment-0001.htm>


More information about the libvir-list mailing list