Skip to contentSkip to conversation

cluster/fence/agents/ipmilan ipmilan.c

Cluster-devel [email protected] 1 participant 1 message Jun 26, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2007-06-26 19:52:53

Modified files:
fence/agents/ipmilan: ipmilan.c

Log message:
Make lan+ work if built as a STONITH module

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ipmilan/ipmilan.c.diff?cvsroot=cluster&r1=1.11&r2=1.12

fence/agents/ipmilan/ipmilan.c +6 -1
@@ -665,6 +665,7 @@
 	char *end = NULL;
 	struct ipmi *i;
 	size_t len;
+	int lanplus = 0;
 
 	if (!ISIPMI(s))
 		return S_OOPS;
@@ -679,6 +680,10 @@
 	if (user) {
 		*user = 0;
 		user++;
+		if (*user && *user == '+') {
+			lanplus = 1;
+			user++;
+		}
 	}
 
 	/* No separator or end of string reached */
@@ -710,7 +715,7 @@
 		user = NULL;
 
 	/* IPMI auth type not supported on RHEL3 */
-	i = ipmi_init(i, host, NULL, user, passwd, 0, 0);
+	i = ipmi_init(i, host, NULL, user, passwd, lanplus, 0);
 	if (!i)
 		return S_OOPS;
 	i->i_config = 1;