Re: [libvirt-php][PATCH] Fix virConnectClose failed issue on list_domains

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

 



[snip]
> +        if (domain != NULL) {
> +                rv = virDomainFree (domain);  // Y.Kawada
> +                if (rv != 0) {
> +                        php_error_docref(NULL TSRMLS_CC,
> E_WARNING,"virDomainFree failed with %i on list_domain: %s", rv,
> LIBVIRT_G (last_error));
> +                }
> +                domain = NULL;
> +        }

Well, this is not the right place to place it. You should place it to
the end of the for cycle that's getting the domain pointers to free the
domains once they're not needed anymore. This has been fixed and pushed
to the repository stating you as the authors however :) Also, the
example PHP scripts have been merged from the local webserver directory
I used for development so please pull the latest contents from git and
before you write any other patch please pull the current tree from the
repository using `git pull` command on the cloned master branch of the
repository.

Your version of the patch was not working for me since it returned
"Unknown error" in my Google Chrome window every time I tried to
libvirt_list_domains() function. I fixed it to put it to the right place
and pushed now.

Thanks for the patch,
Michal

-- 
Michal Novotny <minovotn@xxxxxxxxxx>, RHCE
Virtualization Team (xen userspace), Red Hat

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