[Tkabber-dev] [tclxmpp] r158 committed - * examples/rssbot.tcl: Fixed typos in OQ registration....

tclxmpp at googlecode.com tclxmpp at googlecode.com
Thu Nov 11 16:16:11 MSK 2010


Revision: 158
Author: sgolovan
Date: Thu Nov 11 05:14:58 2010
Log: 	* examples/rssbot.tcl: Fixed typos in OQ registration.

	* xmpp/iq.tcl: Explicitly add from attribute to the response stanzas
	  to make IQ registering working in connections serving multiple JIDs.

	* xmpp/https.tcl, xmpp/socks4.tcl, xmpp/socks5.tcl: Moved canceling
	  timeout events up before debug output to prevent accidental firing.

http://code.google.com/p/tclxmpp/source/detail?r=158

Modified:
  /trunk/ChangeLog
  /trunk/examples/rssbot.tcl
  /trunk/xmpp/https.tcl
  /trunk/xmpp/iq.tcl
  /trunk/xmpp/socks4.tcl
  /trunk/xmpp/socks5.tcl

=======================================
--- /trunk/ChangeLog	Mon Sep 27 01:04:55 2010
+++ /trunk/ChangeLog	Thu Nov 11 05:14:58 2010
@@ -1,3 +1,13 @@
+2009-11-11  Sergei Golovan  <sgolovan at nes.ru>
+
+	* examples/rssbot.tcl: Fixed typos in OQ registration.
+
+	* xmpp/iq.tcl: Explicitly add from attribute to the response stanzas
+	  to make IQ registering working in connections serving multiple JIDs.
+
+	* xmpp/https.tcl, xmpp/socks4.tcl, xmpp/socks5.tcl: Moved canceling
+	  timeout events up before debug output to prevent accidental firing.
+
  2009-09-27  Sergei Golovan  <sgolovan at nes.ru>

  	* xmpp/privacy.tcl: Fixed processing zero order when parsing incoming
=======================================
--- /trunk/examples/rssbot.tcl	Mon Jan 25 09:14:37 2010
+++ /trunk/examples/rssbot.tcl	Thu Nov 11 05:14:58 2010
@@ -29,12 +29,12 @@

  # Register IQ XMLNS
  ::xmpp::iq::register get * http://jabber.org/protocol/disco#info \
-                           xsend::iqDiscoInfo
+                           rssbot::iqDiscoInfo
  ::xmpp::iq::register get * http://jabber.org/protocol/disco#items \
-                           xsend::iqDiscoItems
-::xmpp::iq::register get * jabber:iq:last    xsend::iqLast
-::xmpp::iq::register get * jabber:iq:time    xsend::iqTime
-::xmpp::iq::register get * jabber:iq:version xsend::iqVersion
+                           rssbot::iqDiscoItems
+::xmpp::iq::register get * jabber:iq:last    rssbot::iqLast
+::xmpp::iq::register get * jabber:iq:time    rssbot::iqTime
+::xmpp::iq::register get * jabber:iq:version rssbot::iqVersion

  namespace eval rssbot {}

=======================================
--- /trunk/xmpp/https.tcl	Mon Jan 25 09:14:37 2010
+++ /trunk/xmpp/https.tcl	Thu Nov 11 05:14:58 2010
@@ -659,9 +659,9 @@
      variable $token
      upvar 0 $token state

-    Debug $token 2 "status=$status, errormsg=$errormsg"
-
      catch {after cancel $state(timeoutid)}
+
+    Debug $token 2 "status=$status, errormsg=$errormsg"

      if {$state(async)} {
          set command $state(-command)
=======================================
--- /trunk/xmpp/iq.tcl	Mon Jan 25 09:14:37 2010
+++ /trunk/xmpp/iq.tcl	Thu Nov 11 05:14:58 2010
@@ -233,6 +233,7 @@
      }

      set id [::xmpp::xml::getAttr $args -id]
+    set to [::xmpp::xml::getAttr $args -to]

      if {![info exists cmd]} {
          ::xmpp::Debug $xlib 2 "unsupported $from $id $xmlns"
@@ -241,6 +242,7 @@
                         -error [::xmpp::stanzaerror::error \
                                         cancel service-unavailable] \
                         -to $from \
+                       -from $to \
                         -id $id
      } else {
          set status [uplevel #0 $cmd [list $xlib $from $xmlElement] $args]
@@ -251,6 +253,7 @@
                  ::xmpp::sendIQ $xlib result \
                                 -query [lindex $status 1] \
                                 -to $from \
+                               -from $to \
                                 -id $id
              }
              error {
@@ -260,6 +263,7 @@
                                 -error [eval ::xmpp::stanzaerror::error \
                                                      [lrange $status 1  
end]] \
                                 -to $from \
+                               -from $to \
                                 -id $id
              }
              "" {
=======================================
--- /trunk/xmpp/socks4.tcl	Mon Jan 25 09:14:37 2010
+++ /trunk/xmpp/socks4.tcl	Thu Nov 11 05:14:58 2010
@@ -294,9 +294,9 @@
      variable $token
      upvar 0 $token state

-    Debug $token 2 "status=$status, errormsg=$errormsg"
-
      catch {after cancel $state(timeoutid)}
+
+    Debug $token 2 "status=$status, errormsg=$errormsg"

      if {$state(async)} {
          # In case of asynchronous connection we do the cleanup.
=======================================
--- /trunk/xmpp/socks5.tcl	Mon Jan 25 09:14:37 2010
+++ /trunk/xmpp/socks5.tcl	Thu Nov 11 05:14:58 2010
@@ -625,9 +625,9 @@
      variable $token
      upvar 0 $token state

-    Debug $token 2 "status=$status, errormsg=$errormsg"
-
      catch {after cancel $state(timeoutid)}
+
+    Debug $token 2 "status=$status, errormsg=$errormsg"

      if {$state(async)} {
          # In case of asynchronous connection we do the cleanup.


More information about the Tkabber-dev mailing list