packages: nagios-alert-jabber/nagios-alert-jabber.spec, nagios-alert-jabber...

arekm arekm at pld-linux.org
Tue Feb 22 18:13:45 CET 2011


Author: arekm                        Date: Tue Feb 22 17:13:45 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 6; configurable timeout and lowered to 20s

---- Files affected:
packages/nagios-alert-jabber:
   nagios-alert-jabber.spec (1.13 -> 1.14) , nagios-jabber.alert (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: packages/nagios-alert-jabber/nagios-alert-jabber.spec
diff -u packages/nagios-alert-jabber/nagios-alert-jabber.spec:1.13 packages/nagios-alert-jabber/nagios-alert-jabber.spec:1.14
--- packages/nagios-alert-jabber/nagios-alert-jabber.spec:1.13	Tue Feb 22 18:08:55 2011
+++ packages/nagios-alert-jabber/nagios-alert-jabber.spec	Tue Feb 22 18:13:40 2011
@@ -3,7 +3,7 @@
 Summary(pl.UTF-8):	Program do wysyłania alarmów (Nagiosa) przez jabbera
 Name:		nagios-alert-jabber
 Version:	1.2
-Release:	5
+Release:	6
 License:	GPL
 Group:		Networking
 Source0:	nagios-jabber.alert
@@ -53,6 +53,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2011/02/22 17:13:40  arekm
+- rel 6; configurable timeout and lowered to 20s
+
 Revision 1.13  2011/02/22 17:08:55  arekm
 - rel 5; 60s as default timeout
 

================================================================
Index: packages/nagios-alert-jabber/nagios-jabber.alert
diff -u packages/nagios-alert-jabber/nagios-jabber.alert:1.16 packages/nagios-alert-jabber/nagios-jabber.alert:1.17
--- packages/nagios-alert-jabber/nagios-jabber.alert:1.16	Tue Feb 22 18:08:55 2011
+++ packages/nagios-alert-jabber/nagios-jabber.alert	Tue Feb 22 18:13:40 2011
@@ -8,7 +8,7 @@
 # luzik at pld-linux.org, 2007-03 - added digest auth method(jabber.gda.pl)
 # arekm at pld-linux.org, 2009-07 - added fallback accounts support
 # usage:
-#   jabber.alert [-x] [-a account_id][,otheraccount_id] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
+#   jabber.alert [-x] [-a account_id][,otheraccount_id] [-t timeout ] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
 
 import os
 import re
@@ -25,10 +25,8 @@
 from pyxmpp.jabber.client import JabberClient
 from pyxmpp.streamtls import TLSSettings
 
-socket.setdefaulttimeout(60.0)
-
 try:
-	opts, args = getopt.getopt(sys.argv[1:], "J:P:a:dx")
+	opts, args = getopt.getopt(sys.argv[1:], "J:P:a:dt:x")
 except getopt.GetoptError, e:
 	print >> sys.stderr, "%s: %s " % (sys.argv[0], e)
 	sys.exit(1)
@@ -36,11 +34,14 @@
 jids = []
 html = False
 debug = False
+timeout = 20
 
 tjid = None
 for o, a in opts:
 	if o == '-d':
 		debug = True
+	if o == '-t':
+		timeout = float(a)
 	if o == '-x':
 		html = True
 	if o == '-J':
@@ -55,6 +56,8 @@
 
 		for section in a.split(','):
 			jids.append({ 'jid': config.get(section, 'jid'), 'password': config.get(section, 'password')})
+
+socket.setdefaulttimeout(timeout)
 
 recpt = args
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-alert-jabber/nagios-alert-jabber.spec?r1=1.13&r2=1.14&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-alert-jabber/nagios-jabber.alert?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list