Skip to contentSkip to conversation

cluster/fence/agents/xvm fence_xvmd.c

Cluster-devel [email protected] 1 participant 1 message Dec 14, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-12-14 14:49:38

Modified files:
fence/agents/xvm: fence_xvmd.c

Log message:
Make sure we invoke virConnectOpen with a proper URI. NULL is deprecated in libvirt and we have no control over distro defaults that might not be xen:///.

Patch by Soren Hansen <[email protected]>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/fence_xvmd.c.diff?cvsroot=cluster&r1=1.13&r2=1.14

fence/agents/xvm/fence_xvmd.c +4 -2
@@ -54,6 +54,8 @@
 #include "libcman.h"
 #include "debug.h"
 
+#define LIBVIRT_XEN_URI "xen:///"
+
 static int running = 1;
 
 
@@ -541,7 +543,7 @@
 	virt_list_t *vl = NULL;
 	virt_state_t *dom = NULL;
 
-	vp = virConnectOpen(NULL);
+	vp = virConnectOpen(LIBVIRT_XEN_URI);
 	if (!vp)
 		perror("virConnectOpen");
 
@@ -577,7 +579,7 @@
 			continue;
 	
 		/* Request and/or timeout: open connection */
-		vp = virConnectOpen(NULL);
+		vp = virConnectOpen(LIBVIRT_XEN_URI);
 		if (!vp) {
 			printf("NOTICE: virConnectOpen(): %s; cannot fence!\n",
 			       strerror(errno));