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

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

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

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 Novotny <minovotn redhat com>, RHCE
Virtualization Team (xen userspace), Red Hat

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