<p dir="ltr">Nice work & catch. Thanks,<br>
Michal</p>
<div class="gmail_quote">Dne 19.6.2015 18:49 "Eric Blake" <<a href="mailto:eblake@redhat.com">eblake@redhat.com</a>> napsal(a):<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 06/19/2015 03:17 AM, Michal Privoznik wrote:<br>
> There's a bug in the function. When closing a stream, the stream<br>
> refcount should be decremented. We have a helper function for that<br>
> which (among others) take a virConnectPtr as an argument. However,<br>
> we are passing an internal representation of the virConnect.<br>
> Even gcc warns about this:<br>
><br>
> libvirt-php.c: In function ‘zif_libvirt_stream_close’:<br>
> libvirt-php.c:3748:47: warning: passing argument 2 of ‘resource_change_counter’ from incompatible pointer type<br>
>   resource_change_counter(INT_RESOURCE_STREAM, stream->conn, stream->stream, 0 TSRMLS_CC);<br>
>                                                ^<br>
> libvirt-php.c:470:5: note: expected ‘virConnectPtr’ but argument is of type ‘struct php_libvirt_connection *’<br>
>  int resource_change_counter(int type, virConnectPtr conn, void *memp, int inc TSRMLS_DC)<br>
>      ^<br>
> Signed-off-by: Michal Privoznik <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>><br>
><br>
> Signed-off-by: Michal Privoznik <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>><br>
<br>
Double S-o-b looks odd.<br>
<br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" rel="noreferrer" target="_blank">http://libvirt.org</a><br>
<br>
<br>--<br>
libvir-list mailing list<br>
<a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvir-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br></blockquote></div>