[Debian-ha-commits] [cluster-glue] 12/13: Imported Upstream version 1.0.12~rc1+hg2777

Richard Winters devrik-guest at moszumanska.debian.org
Sat Apr 18 20:18:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

devrik-guest pushed a commit to branch upstream
in repository cluster-glue.

commit 6d65eabcc35e3e5b5466e5ea2d92f79940ca0d20
Author: Richard B Winters <rik at mmogp.com>
Date:   Sat Apr 18 16:09:32 2015 -0400

    Imported Upstream version 1.0.12~rc1+hg2777
---
 .hg_archival.txt                         |  2 +-
 .hgtags                                  |  1 +
 ChangeLog                                | 21 +++++++++++++++++
 cluster-glue-fedora.spec                 |  4 ++--
 cluster-glue-suse.spec                   |  4 ++--
 configure.ac                             |  4 ++--
 doc/hb_report.8.txt                      |  9 +++++++
 doc/stonith/Makefile.am                  |  5 +++-
 hb_report/hb_report.in                   | 40 ++++++++++++++++++++++++--------
 hb_report/utillib.sh                     | 18 ++++++++++++--
 include/pils/plugin.h.in                 |  9 ++++---
 include/stonith/stonith.h                |  2 ++
 lib/clplumbing/ipcsocket.c               |  2 +-
 lib/clplumbing/md5.c                     |  2 +-
 lib/pils/pils.c                          | 17 +++++++-------
 lib/plugins/stonith/apcmaster.c          |  2 +-
 lib/plugins/stonith/apcmastersnmp.c      |  4 ++--
 lib/plugins/stonith/apcsmart.c           |  2 +-
 lib/plugins/stonith/baytech.c            |  2 +-
 lib/plugins/stonith/bladehpi.c           |  6 ++---
 lib/plugins/stonith/cyclades.c           |  4 ++--
 lib/plugins/stonith/drac3.c              |  4 ++--
 lib/plugins/stonith/external.c           |  1 +
 lib/plugins/stonith/external/libvirt     |  4 +---
 lib/plugins/stonith/external/vcenter     | 11 +++------
 lib/plugins/stonith/ibmhmc.c             |  6 ++---
 lib/plugins/stonith/ipmilan.c            | 13 ++++++-----
 lib/plugins/stonith/meatware.c           |  4 ++--
 lib/plugins/stonith/null.c               |  2 +-
 lib/plugins/stonith/nw_rpc100s.c         |  2 +-
 lib/plugins/stonith/rcd_serial.c         |  6 ++---
 lib/plugins/stonith/riloe.c              |  2 +-
 lib/plugins/stonith/rps10.c              |  4 ++--
 lib/plugins/stonith/ssh.c                |  2 +-
 lib/plugins/stonith/stonith_config_xml.h | 18 +++++++-------
 lib/plugins/stonith/suicide.c            |  2 +-
 lib/plugins/stonith/vacm.c               |  4 ++--
 lib/plugins/stonith/wti_mpc.c            |  6 ++---
 lib/plugins/stonith/wti_nps.c            |  2 +-
 lib/stonith/Makefile.am                  |  2 +-
 lib/stonith/expect.c                     |  2 +-
 lib/stonith/main.c                       |  2 +-
 lib/stonith/meatclient.c                 |  4 ++--
 lib/stonith/stonith.c                    | 12 +++++++++-
 lrm/lrmd/lrmd.c                          |  2 +-
 45 files changed, 178 insertions(+), 99 deletions(-)

diff --git a/.hg_archival.txt b/.hg_archival.txt
index a683acf..bf0a272 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,2 +1,2 @@
 repo: e3ffdd7ae81c596b2be7e1e110d2c1255161340e
-node: 3cff550e1084f1accc7782ff371739ec84e31330
+node: b5f1605097857b8b96bd517282ab300e2ad7af99
diff --git a/.hgtags b/.hgtags
index b6f0f68..2599266 100644
--- a/.hgtags
+++ b/.hgtags
@@ -64,3 +64,4 @@ c69dc6ace936f501776df92dab3d611c2405f69e glue-1.0.8
 0a08a469fdc8a0db1875369497bc83c0523ceb21 glue-1.0.9
 12055ca2b025ab250a544701edaa1f5aaf63aef1 glue-1.0.10
 02bdcf58f9a098b717784746308e199e12eeb005 glue-1.0.11
+c64d6e96f20ad5ba245f7fb9e1295b14fa179e29 glue-1.0.12-rc1
diff --git a/ChangeLog b/ChangeLog
index 5f3d71d..af8c4d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+* Thu Sep 26 2013 Dejan Muhamedagic <dejan at suse.de>, Lars Ellenberg <lars.ellenberg at linbit.com>, and many others
+- release candidate 1.0.12-rc1
+- clplumbing: increase listen backlog to 128
+- hb_report: add -X option for extra ssh options
+- hb_report: add support for the rfc5424 syslog date format
+- stonith: external/libvirt: fix exit code in reset
+- stonith: external/vcenter: do not list vms in status
+  (bnc#825765)
+- stonith: fix memory leak in external.c
+- hb_report: enable ssh to prompt for passwords (bnc#808373)
+- hb_report: collect RA trace files
+- hb_report: look for nodes in the archived CIB if pacemaker is
+  not running
+- sbd plugin now lives at http://hg.linux-ha.org/sbd/
+- stonith: if debug's not set, do not send debug messages to the
+  logger (bnc#792124)
+- stonith: log status message at the debug level (bnc#792124)
+- stonith: don't always log debug level messages (bnc#792124)
+- stonith: external/vcenter: fix gethosts to produce list of
+  nodes not vms (bnc#792704)
+
 * Mon Oct 15 2012 Dejan Muhamedagic <dejan at suse.de>, Lars Ellenberg <lars.ellenberg at linbit.com>, and many others
 - stable release 1.0.11
 - lrmd: set max-children depending on the number of processors
diff --git a/cluster-glue-fedora.spec b/cluster-glue-fedora.spec
index dca95b6..964a3ba 100644
--- a/cluster-glue-fedora.spec
+++ b/cluster-glue-fedora.spec
@@ -15,8 +15,8 @@
 
 Name:		cluster-glue
 Summary:	Reusable cluster components
-Version:	1.0.11
-Release:	1%{?dist}
+Version:	1.0.12
+Release:	0.rc1%{?dist}
 License:	GPLv2+ and LGPLv2+
 Url:		http://www.linux-ha.org/wiki/Cluster_Glue
 Group:		System Environment/Base
diff --git a/cluster-glue-suse.spec b/cluster-glue-suse.spec
index 96e7d4b..d344513 100644
--- a/cluster-glue-suse.spec
+++ b/cluster-glue-suse.spec
@@ -29,8 +29,8 @@
 
 Name:           cluster-glue
 Summary:        Reusable cluster components
-Version:        1.0.11
-Release:        1%{?dist}
+Version:        1.0.12
+Release:        0.rc1%{?dist}
 License:        GPL v2 or later; LGPL v2.1 or later
 Url:            http://www.linux-ha.org/wiki/Cluster_Glue
 Group:		Productivity/Clustering/HA
diff --git a/configure.ac b/configure.ac
index 5adefcc..2a93124 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ dnl     checks for compiler characteristics
 dnl     checks for library functions
 dnl     checks for system services
 
-AC_INIT(cluster-glue, 1.0.11, linux-ha-dev at lists.linux-ha.org)
+AC_INIT(cluster-glue, 1.0.12-rc1, linux-ha-dev at lists.linux-ha.org)
 
 FEATURES=""
 HB_PKG=heartbeat
@@ -1201,7 +1201,7 @@ if test "$GCC" != yes; then
         CFLAGS="$CFLAGS -g"
 	enable_fatal_warnings=no
 else
-        CFLAGS="$CFLAGS -ggdb3 -O0"
+        CFLAGS="$CFLAGS -ggdb"
 
 	# We had to eliminate -Wnested-externs because of libtool changes
         EXTRA_FLAGS="-fgnu89-inline
diff --git a/doc/hb_report.8.txt b/doc/hb_report.8.txt
index ebb1e0c..c4f5dac 100644
--- a/doc/hb_report.8.txt
+++ b/doc/hb_report.8.txt
@@ -87,6 +87,11 @@ dest::
 	"hacluster". If you have another user for administration over
 	ssh, please use this option.
 
+*-X* ssh-options::
+	Extra ssh options. These will be added to every ssh
+	invocation. Alternatively, use `$HOME/.ssh/config` to setup
+	desired ssh connection options.
+
 *-S*::
 	Single node operation. Run hb_report only on this node and
 	don't try to start slave collectors on other members of the
@@ -246,6 +251,10 @@ ssh::
 	+
 	If you need to supply a password for your passphrase/login, then
 	always use the `-u` option.
+	+
+	For extra ssh(1) options, if you're too lazy to setup
+	$HOME/.ssh/config, use the `-X` option. Do not forget to put
+	the options in quotes.
 
 sudo::
 	If the ssh user (as specified with the `-u` option) is other
diff --git a/doc/stonith/Makefile.am b/doc/stonith/Makefile.am
index 165a743..4c9b76f 100644
--- a/doc/stonith/Makefile.am
+++ b/doc/stonith/Makefile.am
@@ -23,7 +23,6 @@ stdoc_DATA 		= README.bladehpi \
 			  README.external \
 			  README.ibmrsa \
 			  README.ibmrsa-telnet \
-			  README.ipmilan \
 			  README.meatware \
 			  README.rackpdu \
 			  README.rcd_serial \
@@ -32,3 +31,7 @@ stdoc_DATA 		= README.bladehpi \
 			  README.wti_mpc \
 			  README_kdumpcheck.txt \
 			  README.vcenter
+
+if IPMILAN_BUILD
+stdoc_DATA 		+= README.ipmilan
+endif
diff --git a/hb_report/hb_report.in b/hb_report/hb_report.in
index d7982f5..1b10a28 100755
--- a/hb_report/hb_report.in
+++ b/hb_report/hb_report.in
@@ -66,8 +66,9 @@ fi
 
 usage() {
 	cat<<EOF
-usage: hb_report -f {time|"cts:"testnum} [-t time] [-u user] [-l file]
-       [-n nodes] [-E files] [-p patt] [-L patt] [-e prog] [-MSDZAVsvhd] [dest]
+usage: hb_report -f {time|"cts:"testnum} [-t time]
+       [-u user] [-X ssh-options] [-l file] [-n nodes] [-E files]
+       [-p patt] [-L patt] [-e prog] [-MSDZAVsvhd] [dest]
 
 	-f time: time to start from or a CTS test number
 	-t time: time to finish at (dflt: now)
@@ -77,6 +78,7 @@ usage: hb_report -f {time|"cts:"testnum} [-t time] [-u user] [-l file]
 	         if you run $PROG on the loghost or use autojoin,
 	         it is highly recommended to set this option
 	-u user: ssh user to access other nodes (dflt: empty, root, hacluster)
+	-X ssh-options: extra ssh(1) options
 	-l file: log file
 	-E file: extra logs to collect; this option is additive
 	         (dflt: /var/log/messages)
@@ -243,21 +245,37 @@ get_cib_dir2() {
 }
 get_crm_daemon_dir() {
 	# CRM_DAEMON_DIR
-	local libdir
+	local libdir p
 	libdir=`dirname $HA_BIN`
 	for p in pacemaker heartbeat; do
 		if [ -x $libdir/$p/crmd ]; then
 			debug "setting CRM_DAEMON_DIR to $libdir/$p"
 			CRM_DAEMON_DIR=$libdir/$p
-			break
+			return 0
 		fi
 	done
+	return 1
+}
+get_crm_daemon_dir2() {
+	# CRM_DAEMON_DIR again (brute force)
+	local p d d2
+	for p in /usr /usr/local /opt; do
+		for d in libexec lib64 lib; do
+			for d2 in pacemaker heartbeat; do
+				if [ -x $p/$d/$d2/crmd ]; then
+					debug "setting CRM_DAEMON_DIR to $p/$d/$d2"
+					CRM_DAEMON_DIR=$p/$d/$d2
+					break
+				fi
+			done
+		done
+	done
+}
+compatibility_pcmk() {
+	get_crm_daemon_dir || get_crm_daemon_dir2
 	if [ ! -d "$CRM_DAEMON_DIR" ]; then
 		fatal "cannot find pacemaker daemon directory!"
 	fi
-}
-compatibility_pcmk() {
-	get_crm_daemon_dir
 	get_pe_state_dir || get_pe_state_dir2
 	get_cib_dir || get_cib_dir2
 	debug "setting PCMK_LIB to `dirname $CIB_DIR`"
@@ -851,7 +869,7 @@ cibdiff() {
 	fi
 }
 txtdiff() {
-	diff -u $1 $2
+	diff -bBu $1 $2
 }
 diffcheck() {
 	[ -f "$1" ] || {
@@ -1136,7 +1154,7 @@ if ! is_collector; then
 	userargs="$@"
 	DESTDIR=.
 	DEST="hb_report-"`date +"%a-%d-%b-%Y"`
-	while getopts f:t:l:u:p:L:e:E:n:MSDCZAVsvhd o; do
+	while getopts f:t:l:u:X:p:L:e:E:n:MSDCZAVsvhd o; do
 		case "$o" in
 			h) usage;;
 			V) version;;
@@ -1157,6 +1175,7 @@ if ! is_collector; then
 				USER_NODES="$USER_NODES $OPTARG"
 			;;
 			u) SSH_USER="$OPTARG";;
+			X) SSH_OPTS="$SSH_OPTS $OPTARG";;
 			l) HA_LOG="$OPTARG";;
 			e) EDITOR="$OPTARG";;
 			p) SANITIZE="$SANITIZE $OPTARG";;
@@ -1334,7 +1353,8 @@ if ! is_collector; then
 	fi
 	# assume that only root can collect data
 	SUDO=""
-	if [ -z "$SSH_USER" -a `id -u` != 0 ] || [ "$SSH_USER" != root ]; then
+	if [ -z "$SSH_USER" -a `id -u` != 0 ] ||
+			[ -n "$SSH_USER" -a "$SSH_USER" != root ]; then
 		debug "ssh user other than root, use sudo"
 		SUDO="sudo -u root"
 	fi
diff --git a/hb_report/utillib.sh b/hb_report/utillib.sh
index bbbc6c7..365aad6 100644
--- a/hb_report/utillib.sh
+++ b/hb_report/utillib.sh
@@ -150,15 +150,20 @@ findmsg() {
 #
 str2time() {
 	perl -e "\$time='$*';" -e '
+	$unix_tm = 0;
 	eval "use Date::Parse";
 	if (!$@) {
-		print str2time($time);
+		$unix_tm = str2time($time);
 	} else {
 		eval "use Date::Manip";
 		if (!$@) {
-			print UnixDate(ParseDateString($time), "%s");
+			$unit_tm = UnixDate(ParseDateString($time), "%s");
 		}
 	}
+	if ($unix_tm != "") {
+		$unix_tm = int($unix_tm);
+	}
+	print $unix_tm;
 	'
 }
 getstamp_syslog() {
@@ -167,6 +172,9 @@ getstamp_syslog() {
 getstamp_legacy() {
 	awk '{print $2}' | sed 's/_/ /'
 }
+getstamp_rfc5424() {
+	awk '{print $1}'
+}
 linetime() {
 	local l
 	l=`tail -n +$2 $1 | head -1 | $getstampproc`
@@ -183,6 +191,12 @@ find_getstampproc() {
 			debug "the log file is in the syslog format"
 			break
 		fi
+		t=$(str2time `echo $l | getstamp_rfc5424`)
+		if [ "$t" ]; then
+			func="getstamp_rfc5424"
+			debug "the log file is in the rfc5424 format"
+			break
+		fi
 		t=$(str2time `echo $l | getstamp_legacy`)
 		if [ "$t" ]; then
 			func="getstamp_legacy"
diff --git a/include/pils/plugin.h.in b/include/pils/plugin.h.in
index 0348aae..cb67d91 100644
--- a/include/pils/plugin.h.in
+++ b/include/pils/plugin.h.in
@@ -396,7 +396,8 @@ typedef enum {
 	PIL_INFO	= 4,	/* Informative message */
 	PIL_DEBUG= 5	/* Debug message */
 }PILLogLevel;
-typedef void (*PILLogFun)(PILLogLevel priority, const char * fmt, ...);
+typedef void (*PILLogFun)(PILLogLevel priority, const char * fmt, ...)
+	G_GNUC_PRINTF(2,3);
 
 /*
  * The size glib2 type du jour?
@@ -451,7 +452,8 @@ struct PILPluginImports_s {
 	,	const char * plugintype, const char * pluginname
 	,	void*	plugin_private);
 
-	void	(*log)	(PILLogLevel priority, const char * fmt, ...);
+	void	(*log)	(PILLogLevel priority, const char * fmt, ...)
+		G_GNUC_PRINTF(2,3);
         gpointer (*alloc)(glib_size_t size);
         gpointer (*mrealloc)(gpointer space, glib_size_t size);
 	void	(*mfree)(gpointer space);
@@ -482,7 +484,8 @@ void PilPluginUnivSetMemalloc(PILPluginUniv*
 
 
 void PilPluginUnivSetLog(PILPluginUniv*
-,	void	(*log)	(PILLogLevel priority, const char * fmt, ...));
+,	void	(*log)	(PILLogLevel priority, const char * fmt, ...)
+	G_GNUC_PRINTF(2,3));
 
 
 /* Delete a plugin universe - shut the plugin loading system down */
diff --git a/include/stonith/stonith.h b/include/stonith/stonith.h
index 1aba74b..93fbaac 100644
--- a/include/stonith/stonith.h
+++ b/include/stonith/stonith.h
@@ -43,6 +43,7 @@
 #ifndef __STONITH_H
 #	define __STONITH_H
 #include <glib.h>
+#include <ctype.h>
 
 #include <pils/plugin.h>
 #define	STONITH_VERS	2
@@ -131,6 +132,7 @@ StonithNVpair*
 StonithNVpair*
 	stonith_ghash_to_NVpair(GHashTable* stringtable);
 void	free_NVpair(StonithNVpair*); /* Free result from above 2 functions */
+void strdown(char *str); /* simple replacement for g_strdown */
 
 /*
  * The ST_DEVICEID info call is intended to return the type of the Stonith
diff --git a/lib/clplumbing/ipcsocket.c b/lib/clplumbing/ipcsocket.c
index 804cd11..679b70d 100644
--- a/lib/clplumbing/ipcsocket.c
+++ b/lib/clplumbing/ipcsocket.c
@@ -108,7 +108,7 @@
 
 #if HB_IPC_METHOD == HB_IPC_SOCKET
 
-# define MAX_LISTEN_NUM 10
+# define MAX_LISTEN_NUM 128
 
 # ifndef MSG_NOSIGNAL
 #  define		MSG_NOSIGNAL	0
diff --git a/lib/clplumbing/md5.c b/lib/clplumbing/md5.c
index 46a0c1e..b893483 100644
--- a/lib/clplumbing/md5.c
+++ b/lib/clplumbing/md5.c
@@ -166,7 +166,7 @@ MD5Final(md5byte digest[16], MD5Context *ctx)
 
 	byteSwap(ctx->buf, 16);
 	memcpy(digest, ctx->buf, 16);
-	memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
+	memset(ctx, 0, sizeof(*ctx));	/* In case it's sensitive */
 }
 
 /* The four core functions - F1 is optimized somewhat */
diff --git a/lib/pils/pils.c b/lib/pils/pils.c
index 8f47ba4..4243b22 100644
--- a/lib/pils/pils.c
+++ b/lib/pils/pils.c
@@ -223,7 +223,8 @@ PILRegisterInterface
 ,	void*		ud_interface	/* interface user data 		*/
 );
 static PIL_rc	PILunregister_interface(PILInterface* interfaceid);
-static void	PILLog(PILLogLevel priority, const char * fmt, ...);
+static void	PILLog(PILLogLevel priority, const char * fmt, ...)
+	G_GNUC_PRINTF(2,3);
 
 
 /*
@@ -309,7 +310,7 @@ NewPILPlugin(	PILPluginType* pitype
 	PILPlugin*	ret = NEW(PILPlugin);
 
 	if (DEBUGPLUGIN) {
-		PILLog(PIL_DEBUG, "NewPILPlugin(0x%x)", (unsigned long)ret);
+		PILLog(PIL_DEBUG, "NewPILPlugin(0x%lx)", (unsigned long)ret);
 	}
 
 	STATNEW(plugin);
@@ -362,7 +363,7 @@ NewPILPluginType(PILPluginUniv* pluginuniv
 {
 	PILPluginType*	ret = NEW(PILPluginType);
 	if (DEBUGPLUGIN) {
-		PILLog(PIL_DEBUG, "NewPILPlugintype(0x%x)", (unsigned long)ret);
+		PILLog(PIL_DEBUG, "NewPILPlugintype(0x%lx)", (unsigned long)ret);
 	}
 	STATNEW(pitype);
 
@@ -463,7 +464,7 @@ NewPILPluginUniv(const char * basepluginpath)
 
 	STATNEW(piuniv);
 	if (DEBUGPLUGIN) {
-		PILLog(PIL_DEBUG, "NewPILPluginUniv(0x%x)"
+		PILLog(PIL_DEBUG, "NewPILPluginUniv(0x%lx)"
 		,	(unsigned long)ret);
 	}
 	if (!g_path_is_absolute(basepluginpath)) {
@@ -796,7 +797,7 @@ NewPILInterface(PILInterfaceType*	interfacetype
 	ret = NEW(PILInterface);
 	STATNEW(interface);
 	if (DEBUGPLUGIN) {
-		PILLog(PIL_DEBUG, "NewPILInterface(0x%x)", (unsigned long)ret);
+		PILLog(PIL_DEBUG, "NewPILInterface(0x%lx)", (unsigned long)ret);
 	}
 
 	if (ret) {
@@ -813,7 +814,7 @@ NewPILInterface(PILInterfaceType*	interfacetype
 		ret->if_close = closefun;
 		ret->refcnt = 1;
 		if (DEBUGPLUGIN) {
-			PILLog(PIL_DEBUG, "NewPILInterface(0x%lx:%s/%s)*** user_data: 0x%lx *******"
+			PILLog(PIL_DEBUG, "NewPILInterface(0x%lx:%s/%s)*** user_data: 0x%p *******"
 			,	(unsigned long)ret
 			,	interfacetype->typename
 			,	ret->interfacename
@@ -1705,7 +1706,7 @@ NewPILInterfaceUniv(PILPluginUniv* piuniv)
 	static int		ltinityet = 0;
 
 	if (DEBUGPLUGIN) {
-		PILLog(PIL_DEBUG, "NewPILInterfaceUniv(0x%x)"
+		PILLog(PIL_DEBUG, "NewPILInterfaceUniv(0x%lx)"
 		,	(unsigned long)ret);
 	}
 	if (!ltinityet) {
@@ -1882,7 +1883,7 @@ so_select (const struct dirent *dire)
 	if (DEBUGPLUGIN) {
 		PILLog(PIL_DEBUG
 		,	"FILE %s Doesn't look like a plugin name [%s] "
-		"%d %d %s."
+		"%zd %zd %s."
 		,	dire->d_name, end
 		,	sizeof(obj_end), strlen(dire->d_name)
 		,	&dire->d_name[strlen(dire->d_name)
diff --git a/lib/plugins/stonith/apcmaster.c b/lib/plugins/stonith/apcmaster.c
index db578aa..09a56d3 100644
--- a/lib/plugins/stonith/apcmaster.c
+++ b/lib/plugins/stonith/apcmaster.c
@@ -573,7 +573,7 @@ apcmaster_hostlist(StonithPlugin  *s)
 			if ((nm = (char*)STRDUP(sockname)) == NULL) {
 				goto out_of_memory;
 			}
-			g_strdown(nm);
+			strdown(nm);
 			NameList[numnames] = nm;
 			++numnames;
 			NameList[numnames] = NULL;
diff --git a/lib/plugins/stonith/apcmastersnmp.c b/lib/plugins/stonith/apcmastersnmp.c
index c57f579..a9eeaeb 100644
--- a/lib/plugins/stonith/apcmastersnmp.c
+++ b/lib/plugins/stonith/apcmastersnmp.c
@@ -190,7 +190,7 @@ static const char *NOTpluginID = "APCMS SNMP device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_PORT_PARM \
-	XML_PARAMETER_BEGIN(ST_PORT, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_PORT, "string", "1", "0") \
 	  XML_PORT_SHORTDESC \
 	  XML_PORT_LONGDESC \
 	XML_PARAMETER_END
@@ -490,7 +490,7 @@ apcmastersnmp_hostlist(StonithPlugin * s)
 		    hl = NULL;
 		    return (hl);
 		}
-		g_strdown(hl[num_outlets]);
+		strdown(hl[num_outlets]);
 		num_outlets++;
 	}
     }
diff --git a/lib/plugins/stonith/apcsmart.c b/lib/plugins/stonith/apcsmart.c
index b609a2f..18d1612 100644
--- a/lib/plugins/stonith/apcsmart.c
+++ b/lib/plugins/stonith/apcsmart.c
@@ -664,7 +664,7 @@ apcsmart_set_config(StonithPlugin * s, StonithNVpair* list)
 	}
 	for (ad->hostcount = 0; ad->hostlist[ad->hostcount]
 	;	ad->hostcount++) {
-		g_strdown(ad->hostlist[ad->hostcount]);
+		strdown(ad->hostlist[ad->hostcount]);
 	}
 	if (access(ad->upsdev, R_OK|W_OK|F_OK) < 0) {
 		LOG(PIL_CRIT,"Cannot access tty [%s]", ad->upsdev);
diff --git a/lib/plugins/stonith/baytech.c b/lib/plugins/stonith/baytech.c
index 85275a6..33093ad 100644
--- a/lib/plugins/stonith/baytech.c
+++ b/lib/plugins/stonith/baytech.c
@@ -633,7 +633,7 @@ baytech_hostlist(StonithPlugin  *s)
 		if ((nm = (char*)STRDUP(sockname)) == NULL) {
 			goto out_of_memory;
 		}
-		g_strdown(nm);
+		strdown(nm);
 		NameList[numnames] = nm;
 		++numnames;
 		NameList[numnames] = NULL;
diff --git a/lib/plugins/stonith/bladehpi.c b/lib/plugins/stonith/bladehpi.c
index b835d28..ae9a4cf 100644
--- a/lib/plugins/stonith/bladehpi.c
+++ b/lib/plugins/stonith/bladehpi.c
@@ -155,7 +155,7 @@ static const char *NOTpluginID = "IBM BladeCenter device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_ENTITYROOT_PARM \
-	XML_PARAMETER_BEGIN(ST_ENTITYROOT, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_ENTITYROOT, "string", "1", "0") \
 	  XML_ENTITYROOT_SHORTDESC \
 	  XML_ENTITYROOT_LONGDESC \
 	XML_PARAMETER_END
@@ -171,7 +171,7 @@ static const char *NOTpluginID = "IBM BladeCenter device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_SOFTRESET_PARM \
-	XML_PARAMETER_BEGIN(ST_SOFTRESET, "string", "0") \
+	XML_PARAMETER_BEGIN(ST_SOFTRESET, "string", "0", "0") \
 	  XML_SOFTRESET_SHORTDESC \
 	  XML_SOFTRESET_LONGDESC \
 	XML_PARAMETER_END
@@ -324,7 +324,7 @@ bladehpi_hostlist(StonithPlugin *s)
 			ret = NULL;
 			goto done;
 		}
-		g_strdown(ret[j]);
+		strdown(ret[j]);
 	}
 
 done:
diff --git a/lib/plugins/stonith/cyclades.c b/lib/plugins/stonith/cyclades.c
index 77250ea..6744cd4 100644
--- a/lib/plugins/stonith/cyclades.c
+++ b/lib/plugins/stonith/cyclades.c
@@ -166,7 +166,7 @@ static const char * NOTpluginID = "Cyclades device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_SERIALPORT_PARM \
-	XML_PARAMETER_BEGIN(ST_SERIALPORT, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_SERIALPORT, "string", "1", "0") \
 	  XML_SERIALPORT_SHORTDESC \
 	  XML_SERIALPORT_LONGDESC \
 	XML_PARAMETER_END
@@ -341,7 +341,7 @@ cyclades_hostlist(StonithPlugin  *s)
 			if (!nm) {
 				goto out_of_memory;
 			}
-			g_strdown(nm);
+			strdown(nm);
 			NameList[numnames] = nm;
 			numnames++;
 			NameList[numnames] = NULL;
diff --git a/lib/plugins/stonith/drac3.c b/lib/plugins/stonith/drac3.c
index 5907e29..95be775 100644
--- a/lib/plugins/stonith/drac3.c
+++ b/lib/plugins/stonith/drac3.c
@@ -118,7 +118,7 @@ static const char *NOTpluginID = "Dell DRACIII device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_HOST_PARM \
-	XML_PARAMETER_BEGIN(ST_HOST, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_HOST, "string", "1", "1") \
 	  XML_HOST_SHORTDESC \
 	  XML_HOST_LONGDESC \
 	XML_PARAMETER_END
@@ -352,7 +352,7 @@ drac3_hostlist(StonithPlugin * s)
 	if (hl == NULL) {
 		LOG(PIL_CRIT, "%s: out of memory", __FUNCTION__);
 	} else {
-		g_strdown(hl[0]);
+		strdown(hl[0]);
 	}
 
 	return(hl);
diff --git a/lib/plugins/stonith/external.c b/lib/plugins/stonith/external.c
index d3f26a9..da03665 100644
--- a/lib/plugins/stonith/external.c
+++ b/lib/plugins/stonith/external.c
@@ -770,6 +770,7 @@ external_run_cmd(struct pluginDevice *sd, const char *op, char **output)
 		savevar = g_strdup(getenv(LOGTAG_VAR));
 	}
 	setenv(LOGTAG_VAR, logtag, 1);
+	g_free(logtag);
 
 	if (Debug) {
 		LOG(PIL_DEBUG, "%s: Calling '%s'", __FUNCTION__, cmd );
diff --git a/lib/plugins/stonith/external/libvirt b/lib/plugins/stonith/external/libvirt
index 5fd4eec..494b048 100644
--- a/lib/plugins/stonith/external/libvirt
+++ b/lib/plugins/stonith/external/libvirt
@@ -245,14 +245,12 @@ case $1 in
 
     if [ "$reset_method" = "power_cycle" ]; then
         libvirt_stop
-        rc=$?
-        [ $rc = 1 ] && exit 1
+        [ $? = 1 ] && exit 1
         sleep 2
         libvirt_start
     else
         libvirt_reboot
     fi
-    rc=$?
     exit $?
     ;;
 
diff --git a/lib/plugins/stonith/external/vcenter b/lib/plugins/stonith/external/vcenter
index add38f8..96cfdb8 100755
--- a/lib/plugins/stonith/external/vcenter
+++ b/lib/plugins/stonith/external/vcenter
@@ -232,14 +232,9 @@ elsif ($command ~~ @netCommands) {
 	} else {
 	# Command belongs to the group of commands that lookup the status of VMware vCenter and/or virtual machines
 		if ($command eq "status") {
-			eval {
-				# VI API: Searches the inventory tree for all VirtualMachine managed objects
-				my $vms = Vim::find_entity_views(view_type => "VirtualMachine");
-			};
-			if ($@) {
-				if (ref($@) eq "SoapFault") { dielog("$@->detail\n"); }
-				dielog($@);
-			}
+			# we already connect to the vcenter, no need to do
+			# anything else in status
+			;
 		}
 		elsif ($command eq "gethosts") {
                         foreach my $key (keys(%host_to_vm)) {
diff --git a/lib/plugins/stonith/ibmhmc.c b/lib/plugins/stonith/ibmhmc.c
index 28c2ca3..d33fea9 100644
--- a/lib/plugins/stonith/ibmhmc.c
+++ b/lib/plugins/stonith/ibmhmc.c
@@ -209,7 +209,7 @@ static const char * NOTpluginID = "IBM HMC device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_MANSYSPAT_PARM \
-	XML_PARAMETER_BEGIN(ST_MANSYSPAT, "string", "0") \
+	XML_PARAMETER_BEGIN(ST_MANSYSPAT, "string", "0", "0") \
 	  XML_MANSYSPAT_SHORTDESC \
 	  XML_MANSYSPAT_LONGDESC \
 	XML_PARAMETER_END
@@ -220,7 +220,7 @@ static const char * NOTpluginID = "IBM HMC device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_OPTPASSWD_PARM \
-	XML_PARAMETER_BEGIN(ST_PASSWD, "string", "0") \
+	XML_PARAMETER_BEGIN(ST_PASSWD, "string", "0", "0") \
 	  XML_PASSWD_SHORTDESC \
 	  XML_OPTPASSWD_LONGDESC \
 	XML_PARAMETER_END
@@ -312,7 +312,7 @@ ibmhmc_hostlist(StonithPlugin  *s)
 			stonith_free_hostlist(ret);
 			return NULL;
 		}
-		g_strdown(ret[j]);
+		strdown(ret[j]);
 	}
 	return ret;
 }
diff --git a/lib/plugins/stonith/ipmilan.c b/lib/plugins/stonith/ipmilan.c
index 444c3bf..1efdfee 100644
--- a/lib/plugins/stonith/ipmilan.c
+++ b/lib/plugins/stonith/ipmilan.c
@@ -134,7 +134,7 @@ static const char * NOTpluginid = "IPMI-LAN device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_HOSTNAME_PARM \
-	XML_PARAMETER_BEGIN(ST_HOSTNAME, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_HOSTNAME, "string", "1", "1") \
 	  XML_HOSTNAME_SHORTDESC \
 	  XML_HOSTNAME_LONGDESC \
 	XML_PARAMETER_END
@@ -150,7 +150,7 @@ static const char * NOTpluginid = "IPMI-LAN device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_PORT_PARM \
-	XML_PARAMETER_BEGIN(ST_PORT, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_PORT, "string", "1", "0") \
 	  XML_PORT_SHORTDESC \
 	  XML_PORT_LONGDESC \
 	XML_PARAMETER_END
@@ -166,7 +166,7 @@ static const char * NOTpluginid = "IPMI-LAN device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_AUTH_PARM \
-	XML_PARAMETER_BEGIN(ST_AUTH, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_AUTH, "string", "1", "0") \
 	  XML_AUTH_SHORTDESC \
 	  XML_AUTH_LONGDESC \
 	XML_PARAMETER_END
@@ -182,7 +182,7 @@ static const char * NOTpluginid = "IPMI-LAN device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_PRIV_PARM \
-	XML_PARAMETER_BEGIN(ST_PRIV, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_PRIV, "string", "1", "0") \
 	  XML_PRIV_SHORTDESC \
 	  XML_PRIV_LONGDESC \
 	XML_PARAMETER_END
@@ -198,7 +198,7 @@ static const char * NOTpluginid = "IPMI-LAN device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_RESET_METHOD_PARM \
-	XML_PARAMETER_BEGIN(ST_RESET_METHOD, "string", "0") \
+	XML_PARAMETER_BEGIN(ST_RESET_METHOD, "string", "0", "0") \
 	  XML_RESET_METHOD_SHORTDESC \
 	  XML_RESET_METHOD_LONGDESC \
 	XML_PARAMETER_END
@@ -323,7 +323,7 @@ ipmilan_hostlist(StonithPlugin  *s)
 			ret = NULL;
 			break;
 		}
-		g_strdown(ret[j]);
+		strdown(ret[j]);
 	}
 
 	return(ret);
@@ -576,6 +576,7 @@ ipmilan_new(const char *subplugin)
 		LOG(PIL_CRIT, "out of memory");
 		return(NULL);
 	}
+	LOG(PIL_WARN, "The ipmilan stonith plugin is deprecated! Please use external/ipmi.");
 	memset(nd, 0, sizeof(*nd));
 	nd->pluginid = pluginid;
 	nd->hostlist = NULL;
diff --git a/lib/plugins/stonith/meatware.c b/lib/plugins/stonith/meatware.c
index 96539ba..029ba35 100644
--- a/lib/plugins/stonith/meatware.c
+++ b/lib/plugins/stonith/meatware.c
@@ -157,7 +157,7 @@ Meat_parse_config_info(struct pluginDevice* nd, const char * info)
 		return S_OOPS;
 	}
 	for (nd->hostcount = 0; nd->hostlist[nd->hostcount]; nd->hostcount++) {
-		g_strdown(nd->hostlist[nd->hostcount]);
+		strdown(nd->hostlist[nd->hostcount]);
 	}
 	return(S_OK);
 }
@@ -222,7 +222,7 @@ meatware_reset_req(StonithPlugin * s, int request, const char * host)
 		return S_RESETFAIL;
 	}
 	
-	g_strdown(resp_addr);
+	strdown(resp_addr);
 
 	if (strncmp(resp_mw, "meatware", 8) ||
 	    strncmp(resp_result, "reply", 5) ||
diff --git a/lib/plugins/stonith/null.c b/lib/plugins/stonith/null.c
index 0d351fa..0d0cf04 100644
--- a/lib/plugins/stonith/null.c
+++ b/lib/plugins/stonith/null.c
@@ -182,7 +182,7 @@ null_set_config(StonithPlugin* s, StonithNVpair* list)
 	}
 	for (nd->hostcount = 0; nd->hostlist[nd->hostcount]
 	;	nd->hostcount++) {
-		g_strdown(nd->hostlist[nd->hostcount]);
+		strdown(nd->hostlist[nd->hostcount]);
 	}
 	return nd->hostcount ? S_OK : S_BADCONFIG;
 }
diff --git a/lib/plugins/stonith/nw_rpc100s.c b/lib/plugins/stonith/nw_rpc100s.c
index c98d57c..5ba0827 100644
--- a/lib/plugins/stonith/nw_rpc100s.c
+++ b/lib/plugins/stonith/nw_rpc100s.c
@@ -418,7 +418,7 @@ nw_rpc100s_hostlist(StonithPlugin  *s)
 	if (ret == NULL) {
 		LOG(PIL_CRIT, "%s: out of memory", __FUNCTION__);
 	} else {
-		g_strdown(ret[0]);
+		strdown(ret[0]);
 	}
 
 	return(ret);
diff --git a/lib/plugins/stonith/rcd_serial.c b/lib/plugins/stonith/rcd_serial.c
index e46df87..f1396a7 100644
--- a/lib/plugins/stonith/rcd_serial.c
+++ b/lib/plugins/stonith/rcd_serial.c
@@ -268,7 +268,7 @@ static const char * NOTrcd_serialID = "RCD_Serial device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_DTRRTS_PARM \
-	XML_PARAMETER_BEGIN(ST_DTRRTS, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_DTRRTS, "string", "1", "0") \
 	  XML_DTRRTS_SHORTDESC \
 	  XML_DTRRTS_LONGDESC \
 	XML_PARAMETER_END
@@ -284,7 +284,7 @@ static const char * NOTrcd_serialID = "RCD_Serial device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_MSDURATION_PARM \
-	XML_PARAMETER_BEGIN(ST_MSDURATION, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_MSDURATION, "string", "1", "0") \
 	  XML_MSDURATION_SHORTDESC \
 	  XML_MSDURATION_LONGDESC \
 	XML_PARAMETER_END
@@ -467,7 +467,7 @@ rcd_serial_set_config(StonithPlugin* s, StonithNVpair *list)
 		return S_OOPS;
 	}
 	rcd->hostlist[0] = namestocopy[0].s_value;
-	g_strdown(rcd->hostlist[0]);
+	strdown(rcd->hostlist[0]);
 	rcd->hostlist[1] = NULL;
 	rcd->hostcount = 1;
 	rcd->device = namestocopy[1].s_value;
diff --git a/lib/plugins/stonith/riloe.c b/lib/plugins/stonith/riloe.c
index b9fc0f0..a4a8312 100644
--- a/lib/plugins/stonith/riloe.c
+++ b/lib/plugins/stonith/riloe.c
@@ -164,7 +164,7 @@ RILOE_parse_config_info(struct pluginDevice* nd, const char * info)
 		return S_OOPS;
 	}
 	for (nd->hostcount = 0; nd->hostlist[nd->hostcount]; nd->hostcount++) {
-		g_strdown(nd->hostlist[nd->hostcount]);
+		strdown(nd->hostlist[nd->hostcount]);
 	}
 	return(S_OK);
 }
diff --git a/lib/plugins/stonith/rps10.c b/lib/plugins/stonith/rps10.c
index 021449a..08d9873 100644
--- a/lib/plugins/stonith/rps10.c
+++ b/lib/plugins/stonith/rps10.c
@@ -196,7 +196,7 @@ static const char * NOTwtiid = "OBJECT DESTROYED: (WTI RPS-10)";
 	XML_PARM_LONGDESC_END
 
 #define XML_RPS10_PARM \
-	XML_PARAMETER_BEGIN(ST_RPS10, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_RPS10, "string", "1", "1") \
 	  XML_RPS10_SHORTDESC \
 	  XML_RPS10_LONGDESC \
 	XML_PARAMETER_END
@@ -640,7 +640,7 @@ RPS_parse_config_info(struct pluginDevice* ctx, const char * info)
 		}
 		
 		ctx->controllers[ctx->unit_count].node = STRDUP(node);
-		g_strdown(ctx->controllers[ctx->unit_count].node);
+		strdown(ctx->controllers[ctx->unit_count].node);
 		ctx->controllers[ctx->unit_count].outlet_id = outlet_id;
 		ctx->unit_count++;
 
diff --git a/lib/plugins/stonith/ssh.c b/lib/plugins/stonith/ssh.c
index 1887584..e90c199 100644
--- a/lib/plugins/stonith/ssh.c
+++ b/lib/plugins/stonith/ssh.c
@@ -262,7 +262,7 @@ ssh_set_config(StonithPlugin* s, StonithNVpair* list)
 	}else{
 		for (sd->hostcount = 0; sd->hostlist[sd->hostcount]
 		;	sd->hostcount++) {
-			g_strdown(sd->hostlist[sd->hostcount]);
+			strdown(sd->hostlist[sd->hostcount]);
 		}
 	}
 	
diff --git a/lib/plugins/stonith/stonith_config_xml.h b/lib/plugins/stonith/stonith_config_xml.h
index d36eb8a..ff04ae9 100644
--- a/lib/plugins/stonith/stonith_config_xml.h
+++ b/lib/plugins/stonith/stonith_config_xml.h
@@ -33,9 +33,9 @@
 #define XML_PARAMETERS_BEGIN "<parameters>"
 #define XML_PARAMETERS_END "</parameters>"
 
-/* <parameter name="ipaddr" unique="1">?<content type="string" /></parameter> */
-#define XML_PARAMETER_BEGIN(name,type,req) \
-	"<parameter name=\"" name "\" unique=\"1\" required=\"" req "\">" \
+/* <parameter name="ipaddr" unique="?">?<content type="string" /></parameter> */
+#define XML_PARAMETER_BEGIN(name,type,req,uniq) \
+	"<parameter name=\"" name "\" unique=\"" uniq "\" required=\"" req "\">" \
 	"<content type=\"" type "\" />\n"
 #define XML_PARAMETER_END "</parameter>\n"
 
@@ -119,37 +119,37 @@
  * Complete parameter descriptions for the few standardized parameter names
  */
 #define XML_HOSTLIST_PARM \
-	XML_PARAMETER_BEGIN(ST_HOSTLIST, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_HOSTLIST, "string", "1", "0") \
 	  XML_HOSTLIST_SHORTDESC \
 	  XML_HOSTLIST_LONGDESC \
 	XML_PARAMETER_END
 
 #define XML_IPADDR_PARM \
-	XML_PARAMETER_BEGIN(ST_IPADDR, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_IPADDR, "string", "1", "0") \
 	  XML_IPADDR_SHORTDESC \
 	  XML_IPADDR_LONGDESC \
 	XML_PARAMETER_END
 
 #define XML_LOGIN_PARM \
-	XML_PARAMETER_BEGIN(ST_LOGIN, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_LOGIN, "string", "1", "0") \
 	  XML_LOGIN_SHORTDESC \
 	  XML_LOGIN_LONGDESC \
 	XML_PARAMETER_END
 
 #define XML_PASSWD_PARM \
-	XML_PARAMETER_BEGIN(ST_PASSWD, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_PASSWD, "string", "1", "0") \
 	  XML_PASSWD_SHORTDESC \
 	  XML_PASSWD_LONGDESC \
 	XML_PARAMETER_END
 
 #define XML_COMMUNITY_PARM \
-	XML_PARAMETER_BEGIN(ST_COMMUNITY, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_COMMUNITY, "string", "1", "0") \
 	  XML_COMMUNITY_SHORTDESC \
 	  XML_COMMUNITY_LONGDESC \
 	XML_PARAMETER_END
 
 #define XML_TTYDEV_PARM \
-	XML_PARAMETER_BEGIN(ST_TTYDEV, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_TTYDEV, "string", "1", "0") \
 	  XML_TTYDEV_SHORTDESC \
 	  XML_TTYDEV_LONGDESC \
 	XML_PARAMETER_END
diff --git a/lib/plugins/stonith/suicide.c b/lib/plugins/stonith/suicide.c
index 9d1b3ea..b9d1db4 100644
--- a/lib/plugins/stonith/suicide.c
+++ b/lib/plugins/stonith/suicide.c
@@ -139,7 +139,7 @@ suicide_hostlist(StonithPlugin  *s)
 		LOG(PIL_CRIT, "out of memory");
 		return ret;
 	}
-	g_strdown(ret[0]);
+	strdown(ret[0]);
 
 	return ret;
 }
diff --git a/lib/plugins/stonith/vacm.c b/lib/plugins/stonith/vacm.c
index 4023cf2..ce6d041 100644
--- a/lib/plugins/stonith/vacm.c
+++ b/lib/plugins/stonith/vacm.c
@@ -138,7 +138,7 @@ static const char * NOTpluginid = "VACM device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_NEXXUS_PARM \
-	XML_PARAMETER_BEGIN(ST_NEXXUS, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_NEXXUS, "string", "1", "1") \
 	  XML_NEXXUS_SHORTDESC \
 	  XML_NEXXUS_LONGDESC \
 	XML_PARAMETER_END
@@ -262,7 +262,7 @@ vacm_hostlist(StonithPlugin *s)
                stonith_free_hostlist(hlst);
                return NULL;
 	    }
-            g_strdown(hlst[hrcnt]);
+            strdown(hlst[hrcnt]);
             hrcnt++;
          }
       }else {
diff --git a/lib/plugins/stonith/wti_mpc.c b/lib/plugins/stonith/wti_mpc.c
index b263b55..548f91c 100644
--- a/lib/plugins/stonith/wti_mpc.c
+++ b/lib/plugins/stonith/wti_mpc.c
@@ -193,7 +193,7 @@ static const char *NOTpluginID = "WTI MPC device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_PORT_PARM \
-	XML_PARAMETER_BEGIN(ST_PORT, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_PORT, "string", "1", "0") \
 	  XML_PORT_SHORTDESC \
 	  XML_PORT_LONGDESC \
 	XML_PARAMETER_END
@@ -209,7 +209,7 @@ static const char *NOTpluginID = "WTI MPC device has been destroyed";
 	XML_PARM_LONGDESC_END
 
 #define XML_MIBVERSION_PARM \
-	XML_PARAMETER_BEGIN(ST_MIBVERSION, "string", "1") \
+	XML_PARAMETER_BEGIN(ST_MIBVERSION, "string", "1", "0") \
 	  XML_PORT_SHORTDESC \
 	  XML_PORT_LONGDESC \
 	XML_PARAMETER_END
@@ -508,7 +508,7 @@ wti_mpc_hostlist(StonithPlugin * s)
 		    hl = NULL;
 		    return (hl);
 		}
-		g_strdown(hl[num_outlets]);
+		strdown(hl[num_outlets]);
 		num_outlets++;
 	}
     }
diff --git a/lib/plugins/stonith/wti_nps.c b/lib/plugins/stonith/wti_nps.c
index aa98e61..f0b81f7 100644
--- a/lib/plugins/stonith/wti_nps.c
+++ b/lib/plugins/stonith/wti_nps.c
@@ -538,7 +538,7 @@ wti_nps_hostlist(StonithPlugin  *s)
 			if ((nm = STRDUP(sockname)) == NULL) {
 				goto out_of_memory;
 			}
-			g_strdown(nm);
+			strdown(nm);
 			NameList[numnames] = nm;
 			++numnames;
 			NameList[numnames] = NULL;
diff --git a/lib/stonith/Makefile.am b/lib/stonith/Makefile.am
index a8fca04..429e1d3 100644
--- a/lib/stonith/Makefile.am
+++ b/lib/stonith/Makefile.am
@@ -36,7 +36,7 @@ stonith_LDADD		= libstonith.la $(top_builddir)/lib/pils/libpils.la $(GLIBLIB) \
 stonith_LDFLAGS		=  @LIBADD_DL@ @LIBLTDL@ -export-dynamic @DLOPEN_FORCE_FLAGS@ @LIBADD_INTL@ 
 
 meatclient_SOURCES	= meatclient.c 
-meatclient_LDADD	= $(GLIBLIB)
+meatclient_LDADD	= $(GLIBLIB) libstonith.la
 
 ## libraries
 
diff --git a/lib/stonith/expect.c b/lib/stonith/expect.c
index c76e6e5..bb1f818 100644
--- a/lib/stonith/expect.c
+++ b/lib/stonith/expect.c
@@ -414,7 +414,7 @@ StringToHostList(const char * s)
 		memcpy(*hret, here, slen);
 		/* Add EOS to result string */
 		(*hret)[slen] = EOS;
-		g_strdown(*hret);
+		strdown(*hret);
 		here += slen;
 		++hret;
 	}
diff --git a/lib/stonith/main.c b/lib/stonith/main.c
index 765d839..44e099f 100644
--- a/lib/stonith/main.c
+++ b/lib/stonith/main.c
@@ -717,7 +717,7 @@ main(int argc, char** argv)
 		if (optind < argc) {
 			char *nodename;
 			nodename = g_strdup(argv[optind]);
-			g_strdown(nodename);
+			strdown(nodename);
 			rc = stonith_req_reset(s, reset_type, nodename);
 			g_free(nodename);
 		}
diff --git a/lib/stonith/meatclient.c b/lib/stonith/meatclient.c
index 7674f39..e95dc0e 100644
--- a/lib/stonith/meatclient.c
+++ b/lib/stonith/meatclient.c
@@ -60,7 +60,7 @@ main(int argc, char** argv)
 	char *		opthost = NULL;
 	int		clearhost = 0;
 
-	int		c, argcount, waitmode;
+	int		c, argcount, waitmode = 0;
 	int		errors = 0;
 
 	if ((cmdname = strrchr(argv[0], '/')) == NULL) {
@@ -89,7 +89,7 @@ main(int argc, char** argv)
 		usage(cmdname);
 	}
 	
-	g_strdown(opthost);
+	strdown(opthost);
 
 	if (clearhost) {
 
diff --git a/lib/stonith/stonith.c b/lib/stonith/stonith.c
index 5d5ef29..4ced8c7 100644
--- a/lib/stonith/stonith.c
+++ b/lib/stonith/stonith.c
@@ -447,6 +447,16 @@ stonith_get_status(Stonith* s)
 	return S_INVAL;
 }
 
+void
+strdown(char *str)
+{
+	while( *str ) {
+		if( isupper(*str) )
+			*str = tolower(*str);
+		str++;
+	}
+}
+
 int
 stonith_req_reset(Stonith* s, int operation, const char* node)
 {
@@ -457,7 +467,7 @@ stonith_req_reset(Stonith* s, int operation, const char* node)
 		if (nodecopy == NULL) {
 			return S_OOPS;
 		}
-		g_strdown(nodecopy);
+		strdown(nodecopy);
 
 		rc = sp->s_ops->req_reset(sp, operation, nodecopy);
 		FREE(nodecopy);
diff --git a/lrm/lrmd/lrmd.c b/lrm/lrmd/lrmd.c
index 2ac75d6..385096b 100644
--- a/lrm/lrmd/lrmd.c
+++ b/lrm/lrmd/lrmd.c
@@ -1429,7 +1429,7 @@ on_receive_cmd (IPC_Channel* ch, gpointer user_data)
 	lrmd_client_t* client = NULL;
 	struct ha_msg* msg = NULL;
 	char *msg_s;
-	int ret;
+	int ret = FALSE;
 
 	client = (lrmd_client_t*)user_data;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/cluster-glue.git



More information about the Debian-HA-Commits mailing list