[Tkabber-dev] r2021 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Dec 22 13:20:28 MSK 2013


Author: sergei
Date: 2013-12-22 13:20:28 +0400 (Sun, 22 Dec 2013)
New Revision: 2021

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/login.tcl
Log:
	* login.tcl: Reduced boshhold default option to 1 because 2 is proved
	  not to work with ejabberd mod_http_bind. Enabled TLSv1 because it
	  is disabled in the tls Tcl extension by default.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2013-12-03 18:49:49 UTC (rev 2020)
+++ trunk/tkabber/ChangeLog	2013-12-22 09:20:28 UTC (rev 2021)
@@ -1,3 +1,9 @@
+2013-12-22  Sergei Golovan  <sgolovan at nes.ru>
+
+	* login.tcl: Reduced boshhold default option to 1 because 2 is proved
+	  not to work with ejabberd mod_http_bind. Enabled TLSv1 because it
+	  is disabled in the tls Tcl extension by default.
+
 2013-12-03  Sergei Golovan  <sgolovan at nes.ru>
 
 	* proxy.tcl: Enabled TLS1 for secure HTTP connections because there

Modified: trunk/tkabber/login.tcl
===================================================================
--- trunk/tkabber/login.tcl	2013-12-03 18:49:49 UTC (rev 2020)
+++ trunk/tkabber/login.tcl	2013-12-22 09:20:28 UTC (rev 2021)
@@ -146,7 +146,7 @@
 	[::msgcat::mc "Interval server can wait before responding to BOSH request\
 		       (in milliseconds)."] \
 	-group Login -type integer
-    custom::defvar loginconf(boshhold) 2 \
+    custom::defvar loginconf(boshhold) 1 \
 	[::msgcat::mc "Maximum number of requests the connection manager is\
 		       allowed to keep waiting at any time."] \
 	-group Login -type integer
@@ -601,7 +601,8 @@
 		lappend hosts1 [list $host [incr port]]
 	    }
 	    set hosts $hosts1
-	    lappend args -certfile      $lc(sslcertfile) \
+	    lappend args -tls1          1 \
+			 -certfile      $lc(sslcertfile) \
 			 -castore       $lc(sslcacertstore) \
 			 -keyfile       $lc(sslkeyfile) \
 			 -verifycommand [list client:tls_callback $xlib] \
@@ -669,15 +670,18 @@
 
     array set lc $logindata
 
-    if {$use_tls && $lc(stream_options) == "encrypted"} {
+    if {!$lc(usebosh) && !$lc(usehttppoll) && \
+	    $use_tls && $lc(stream_options) == "encrypted"} {
 	::xmpp::starttls::starttls $xlib \
 			-command       [list login_login2 $xlib $logindata] \
+			-tls1          1 \
 			-certfile      $lc(sslcertfile) \
 			-castore       $lc(sslcacertstore) \
 			-keyfile       $lc(sslkeyfile) \
 			-verifycommand [list client:tls_callback $xlib] \
 			-infocommand   [list update_tls_info $xlib]
-    } elseif {$have_compress && $lc(stream_options) == "compressed"} {
+    } elseif {!$lc(usebosh) && !$lc(usehttppoll) && \
+	    $have_compress && $lc(stream_options) == "compressed"} {
 	::xmpp::compress::compress $xlib \
 			-command     [list login_login2 $xlib $logindata]
     } else {



More information about the Tkabber-dev mailing list