[PATCH 3/3] fix libvirt_connect failure without Xen

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

 



Currently libvirt_connect fails if libvirt has no Xen support.
This is because virGetVersion checks for Xen if typeVer!=NULL.
---
 src/libvirt.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index ce39a28..9a1b51a 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -173,13 +173,12 @@ PHP_RSHUTDOWN_FUNCTION(libvirt)
 PHP_MINFO_FUNCTION(libvirt)
 {
 	unsigned long libVer;
-	unsigned long typeVer;
 	char *version;
 	php_info_print_table_start();
 	php_info_print_table_row(2, "Libvirt support", "enabled");
 	php_info_print_table_row(2, "Extension version", PHP_LIBVIRT_WORLD_VERSION);
 
-	if (virGetVersion(&libVer,NULL,&typeVer)== 0)
+	if (virGetVersion(&libVer,NULL,NULL)== 0)
 	{
 		version=emalloc(100);
 		snprintf(version, 100, "%i.%i.%i", (long)((libVer/1000000) % 1000),(long)((libVer/1000) % 1000),(long)(libVer % 1000));
@@ -590,13 +589,12 @@ PHP_FUNCTION(libvirt_connect)
 	unsigned long index;
 
 	unsigned long libVer;
-	unsigned long typeVer;
 
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sba", &url,&url_len,&readonly,&zcreds) == FAILURE) {
         	RETURN_FALSE;
 	}
 
-	if (virGetVersion(&libVer,NULL,&typeVer)!= 0)
+	if (virGetVersion(&libVer,NULL,NULL)!= 0)
 		RETURN_FALSE;
 
 	if (libVer<6002)
-- 
1.7.4.1

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