[monitoring-plugins] Fix check_jabber to work with Openfire servers

Holger Weiss git at monitoring-plugins.org
Tue Sep 16 12:40:10 CEST 2014


 Module: monitoring-plugins
 Branch: maint
 Commit: 013ca2c508386c548ec145832ab8be1e8306cca0
 Author: Holger Weiss <holger at zedat.fu-berlin.de>
   Date: Tue Sep 16 12:28:51 2014 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=013ca2c

Fix check_jabber to work with Openfire servers

The plugin expected:

	<?xml version='1.0'?>

But Openfire sends:

	<?xml version='1.0' encoding='UTF-8'?>

---

 NEWS                | 4 ++++
 plugins/check_tcp.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f2898ab..8109f80 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 This file documents the major additions and syntax changes between releases.
 
+2.0.1 ...
+	FIXES
+	Fix check_jabber to work with Openfire servers
+
 2.0 11th July 2014
 	ENHANCEMENTS
 	check_mailq now supports auto detection of qmail, postfix, exim and nullmailer with
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index bd7736b..fc0adba 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -172,7 +172,7 @@ main (int argc, char **argv)
 	}
 	else if (!strncmp(SERVICE, "JABBER", 6)) {
 		SEND = "<stream:stream to=\'host\' xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'>\n";
-		EXPECT = "<?xml version=\'1.0\'?><stream:stream xmlns=\'jabber:client\' xmlns:stream=\'http://etherx.jabber.org/streams\'";
+		EXPECT = "<?xml version=\'1.0\'";
 		QUIT = "</stream:stream>\n";
 		flags |= FLAG_HIDE_OUTPUT;
 		PORT = 5222;



More information about the Commits mailing list