[Tkabber-dev] r1758 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Mar 29 10:24:45 MSD 2009


Author: sergei
Date: 2009-03-29 10:24:45 +0400 (Sun, 29 Mar 2009)
New Revision: 1758

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/si.tcl
Log:
	* si.tcl: Fixed sending error stanza to a filetransfer peer when the
	  transport negotiation fails.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-28 18:49:22 UTC (rev 1757)
+++ trunk/tkabber/ChangeLog	2009-03-29 06:24:45 UTC (rev 1758)
@@ -1,3 +1,8 @@
+2009-03-29  Sergei Golovan  <sgolovan at nes.ru>
+
+	* si.tcl: Fixed sending error stanza to a filetransfer peer when the
+	  transport negotiation fails.
+
 2009-03-28  Sergei Golovan  <sgolovan at nes.ru>
 
 	* si.tcl, plugins/si/ibb.tcl, plugins/si/iqibb.tcl,

Modified: trunk/tkabber/si.tcl
===================================================================
--- trunk/tkabber/si.tcl	2009-03-28 18:49:22 UTC (rev 1757)
+++ trunk/tkabber/si.tcl	2009-03-29 06:24:45 UTC (rev 1758)
@@ -335,6 +335,14 @@
 proc si::set_handler_cont {xlib from iqid lang id subels status xml} {
     variable transport
 
+    if {$status == "error"} {
+        ::xmpp::sendIQ $xlib error \
+                       -error $xml \
+                       -to $from \
+                       -id $iqid
+	return
+    }
+
     foreach item $subels {
 	::xmpp::xml::split $item tag xmlns attrs cdata subels
 
@@ -360,18 +368,12 @@
 	}
     }
 
-    if {$status == "error"} {
+    if {![info exists stream]} {
         ::xmpp::sendIQ $xlib error \
-                       -error $xml \
-                       -to $from \
-                       -id $iqid
-    }
-
-    if {$stream == ""} {
-        ::xmpp::sendIQ $xlib error \
                        -error [::xmpp::stanzaerror::error modify bad-request] \
                        -to $from \
                        -id $iqid
+	return
     }
 
     set res_elements {}



More information about the Tkabber-dev mailing list