[Tkabber-dev] [tclxmpp commit] r84 - in trunk: . xmpp

codesite-noreply at google.com codesite-noreply at google.com
Thu Mar 5 22:48:59 MSK 2009


Author: sgolovan
Date: Thu Mar  5 10:39:21 2009
New Revision: 84

Modified:
    trunk/ChangeLog
    trunk/xmpp/iq.tcl

Log:
	* xmpp/iq.tcl: Fixed unregistering XMLNS if it was registered for
	  more than one callbacks for different types and/or tags.


Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Thu Mar  5 10:39:21 2009
@@ -1,3 +1,8 @@
+2009-03-05  Sergei Golovan  <sgolovan at nes.ru>
+
+	* xmpp/iq.tcl: Fixed unregistering XMLNS if it was registered for
+	  more than one callbacks for different types and/or tags.
+
  2009-02-28  Sergei Golovan  <sgolovan at nes.ru>

  	* xmpp/delay.tcl: Changed output format of ::xmpp::delay::parse

Modified: trunk/xmpp/iq.tcl
==============================================================================
--- trunk/xmpp/iq.tcl	(original)
+++ trunk/xmpp/iq.tcl	Thu Mar  5 10:39:21 2009
@@ -162,12 +162,16 @@

      unset IqCmd($xlib,$type,$tag,$xmlns)

+    # TODO: Work with patterns
+    if {[string equal $xmlns *]} return
+
+    if {[llength [array names IqCmd $xlib,*,*,$xmlns]] > 0} return
      if {![info exists SupportedNS($xlib)]} return

-    set idx [lsearch -exact $SupportedNS($xlib)]
+    set idx [lsearch -exact $SupportedNS($xlib) $xmlns]
      if {$idx >= 0} {
          set SupportedNS($xlib) [lreplace $SupportedNS($xlib) $idx $idx]
-        if {[llength $SupportedNS($xlib)]} {
+        if {[llength $SupportedNS($xlib)] == 0} {
              unset SupportedNS($xlib)
          }
      }


More information about the Tkabber-dev mailing list