[Tkabber-dev] [tclxmpp] r137 committed - * xmpp/privacy.tcl: Fixed processing server replies in synchronous mo...

tclxmpp at googlecode.com tclxmpp at googlecode.com
Mon Jan 18 17:31:25 MSK 2010


Revision: 137
Author: sgolovan
Date: Mon Jan 18 06:30:49 2010
Log: 	* xmpp/privacy.tcl: Fixed processing server replies in synchronous  
mode
	  if multiple connections are opened (closes:
	  http://yo.jabber.ru/bugzilla/show_bug.cgi?id=394).

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

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

=======================================
--- /trunk/ChangeLog	Sat Jan 16 15:10:44 2010
+++ /trunk/ChangeLog	Mon Jan 18 06:30:49 2010
@@ -1,3 +1,9 @@
+2010-01-18  Sergei Golovan  <sgolovan at nes.ru>
+
+	* xmpp/privacy.tcl: Fixed processing server replies in synchronous mode
+	  if multiple connections are opened (closes:
+	  http://yo.jabber.ru/bugzilla/show_bug.cgi?id=394).
+
  2010-01-17  Sergei Golovan  <sgolovan at nes.ru>

  	* xmpp/https.tcl, xmpp/socks4.tcl, xmpp/socks5.tcl, xmpp/pconnect.tcl:
=======================================
--- /trunk/xmpp/privacy.tcl	Mon Jan  4 06:58:37 2010
+++ /trunk/xmpp/privacy.tcl	Mon Jan 18 06:30:49 2010
@@ -65,13 +65,13 @@
      }

      variable rid
-    incr rid
+    set lrid [incr rid]

      set id \
          [::xmpp::sendIQ $xlib get \
                  -query [::xmpp::xml::create query \
                                              -xmlns jabber:iq:privacy] \
-                -command [namespace code [list ParseListsReply $rid  
$commands]] \
+                -command [namespace code [list ParseListsReply $lrid  
$commands]] \
                  -timeout $timeout]

      if {[llength $commands] > 0} {
@@ -80,9 +80,9 @@
      } else {
          # Synchronous mode
          variable answer
-        vwait [namespace current]::answer($rid)
-        foreach {status msg} $answer($rid) break
-        unset answer($rid)
+        vwait [namespace current]::answer($lrid)
+        foreach {status msg} $answer($lrid) break
+        unset answer($lrid)

          switch -- $status {
              ok {
@@ -195,7 +195,7 @@
      }

      variable rid
-    incr rid
+    set lrid [incr rid]

      set id \
          [::xmpp::sendIQ $xlib get \
@@ -203,7 +203,7 @@
                                  -xmlns jabber:iq:privacy \
                                  -subelement [::xmpp::xml::create list \
                                                      -attrs [list name  
$name]]] \
-                -command [namespace code [list ParseItemsReply $rid  
$commands]] \
+                -command [namespace code [list ParseItemsReply $lrid  
$commands]] \
                  -timeout $timeout]

      if {[llength $commands] > 0} {
@@ -212,9 +212,9 @@
      } else {
          # Synchronous mode
          variable answer
-        vwait [namespace current]::answer($rid)
-        foreach {status msg} $answer($rid) break
-        unset answer($rid)
+        vwait [namespace current]::answer($lrid)
+        foreach {status msg} $answer($lrid) break
+        unset answer($lrid)

          switch -- $status {
              ok {
@@ -409,7 +409,7 @@
      }

      variable rid
-    incr rid
+    set lrid [incr rid]

      set id \
          [::xmpp::sendIQ $xlib set \
@@ -418,7 +418,7 @@
                                  -subelement [::xmpp::xml::create list \
                                                      -attrs [list name  
$name] \
                                                      -subelements $subels]]  
\
-                -command [namespace code [list ParseSendItemsReply $rid  
$commands]] \
+                -command [namespace code [list ParseSendItemsReply $lrid  
$commands]] \
                  -timeout $timeout]

      if {[llength $commands] > 0} {
@@ -427,9 +427,9 @@
      } else {
          # Synchronous mode
          variable answer
-        vwait [namespace current]::answer($rid)
-        foreach {status msg} $answer($rid) break
-        unset answer($rid)
+        vwait [namespace current]::answer($lrid)
+        foreach {status msg} $answer($lrid) break
+        unset answer($lrid)

          switch -- $status {
              ok {
@@ -518,7 +518,7 @@
      }

      variable rid
-    incr rid
+    set lrid [incr rid]

      set id \
          [::xmpp::sendIQ $xlib set \
@@ -526,7 +526,7 @@
                                  -xmlns jabber:iq:privacy \
                                  -subelement [::xmpp::xml::create default \
                                                      -attrs $attrs]] \
-                -command [namespace code [list ParseDefaultReply $rid  
$commands]] \
+                -command [namespace code [list ParseDefaultReply $lrid  
$commands]] \
                  -timeout $timeout]

      if {[llength $commands] > 0} {
@@ -535,9 +535,9 @@
      } else {
          # Synchronous mode
          variable answer
-        vwait [namespace current]::answer($rid)
-        foreach {status msg} $answer($rid) break
-        unset answer($rid)
+        vwait [namespace current]::answer($lrid)
+        foreach {status msg} $answer($lrid) break
+        unset answer($lrid)

          switch -- $status {
              ok {
@@ -626,7 +626,7 @@
      }

      variable rid
-    incr rid
+    set lrid [incr rid]

      set id \
          [::xmpp::sendIQ $xlib set \
@@ -634,7 +634,7 @@
                                  -xmlns jabber:iq:privacy \
                                  -subelement [::xmpp::xml::create active \
                                                      -attrs $attrs]] \
-                -command [namespace code [list ParseActiveReply $rid  
$commands]] \
+                -command [namespace code [list ParseActiveReply $lrid  
$commands]] \
                  -timeout $timeout]

      if {[llength $commands] > 0} {
@@ -643,9 +643,9 @@
      } else {
          # Synchronous mode
          variable answer
-        vwait [namespace current]::answer($rid)
-        foreach {status msg} $answer($rid) break
-        unset answer($rid)
+        vwait [namespace current]::answer($lrid)
+        foreach {status msg} $answer($lrid) break
+        unset answer($lrid)

          switch -- $status {
              ok {


More information about the Tkabber-dev mailing list