[Tkabber-dev] r853 - in trunk/tkabber: . jabberlib-tclxml

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Dec 31 03:38:01 MSK 2006


Author: sergei
Date: 2006-12-31 03:37:59 +0300 (Sun, 31 Dec 2006)
New Revision: 853

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
   trunk/tkabber/login.tcl
Log:
	* jabberlib-tclxml/jabberlib.tcl, login.tcl: Fixed IDNA domains
	  support.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-12-30 16:18:18 UTC (rev 852)
+++ trunk/tkabber/ChangeLog	2006-12-31 00:37:59 UTC (rev 853)
@@ -1,3 +1,8 @@
+2006-12-31  Sergei Golovan  <sgolovan at nes.ru>
+
+	* jabberlib-tclxml/jabberlib.tcl, login.tcl: Fixed IDNA domains
+	  support.
+
 2006-12-30  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/es.msg: Updated (thanks to Badlop).

Modified: trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
===================================================================
--- trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2006-12-30 16:18:18 UTC (rev 852)
+++ trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2006-12-31 00:37:59 UTC (rev 853)
@@ -230,17 +230,17 @@
     }
 
     if {$hosts == {}} {
-	set hosts [list [list $host $port]]
+	set hosts [list [list [idna::domain_toascii $host] $port]]
     }
 
     ::LOG "(jlib::connect) Server:'$server' ConnectionID:'$connid'"
 
     foreach hp $hosts {
 	if {[catch {
-		set host [idna::domain_toascii [lindex $hp 0]]
-		set port [lindex $hp 1]
-		eval [list transport::${transport}::connect $connid \
-							    $host $port] $args
+		eval [list transport::${transport}::connect \
+			   $connid \
+			   [lindex $hp 0] \
+			   [lindex $hp 1]] $args
 	    } sock]} {
 	    set error 1
 	} else {

Modified: trunk/tkabber/login.tcl
===================================================================
--- trunk/tkabber/login.tcl	2006-12-30 16:18:18 UTC (rev 852)
+++ trunk/tkabber/login.tcl	2006-12-31 00:37:59 UTC (rev 853)
@@ -312,11 +312,13 @@
 	lappend args -proxyuseragent $lc(httpuseragent)
     }
 
+    set ascii_server [idna::domain_toascii $lc(server)]
+
     if {$have_http_poll && $lc(usehttppoll)} {
 	if {$lc(pollurl) != ""} {
 	    set url $lc(pollurl)
 	} else {
-	    set url [jlibdns::get_http_poll_url $lc(server)]
+	    set url [jlibdns::get_http_poll_url $ascii_server]
 	}
 	return [eval [list jlib::connect $connid \
 				-transport http_poll \
@@ -335,9 +337,9 @@
 	if {$lc(usealtserver)} {
 	    set hosts {}
 	} else {
-	    set hosts [jlibdns::get_addr_port $lc(server)]
+	    set hosts [jlibdns::get_addr_port $ascii_server]
 	    if {[lempty $hosts]} {
-		set hosts [list [list $lc(server) 5222]]
+		set hosts [list [list $ascii_server 5222]]
 	    }
 	}
 	set transport tcp
@@ -372,7 +374,7 @@
 	}
 
 	if {$lc(usealtserver)} {
-	    set hosts [list [list $lc(altserver) $lc(altport)]]
+	    set hosts [list [list [idna::domain_toascii $lc(altserver)] $lc(altport)]]
 	}
 
 	return [eval [list jlib::connect $connid \



More information about the Tkabber-dev mailing list