[Tkabber-dev] r1785 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 21 21:00:34 MSD 2009


Author: sergei
Date: 2009-04-21 21:00:34 +0400 (Tue, 21 Apr 2009)
New Revision: 1785

Modified:
   trunk/tkabber/pubsub.tcl
Log:
	* pubsub.tcl: Fixed typo.


Modified: trunk/tkabber/pubsub.tcl
===================================================================
--- trunk/tkabber/pubsub.tcl	2009-04-21 16:42:45 UTC (rev 1784)
+++ trunk/tkabber/pubsub.tcl	2009-04-21 17:00:34 UTC (rev 1785)
@@ -48,7 +48,7 @@
     set newArgs {}
     foreach {key val} $args {
 	switch -- $key {
-	    -command { set command [list $val] }
+	    -command { set commands [list $val] }
 	    default  { lappend newArgs $key $val }
 	}
     }
@@ -91,20 +91,28 @@
 	    -command [list data::test_error_res $w]
 }
 
-proc pubsub::requestSubscriptions {xlib service node} {
+proc pubsub::requestSubscriptions {xlib service node args} {
     debugmsg pubsub [info level 0]
 
-    if {$node == ""} {
-	set args {}
-    } else {
-	set args [list -node $node]
+    set commands {}
+    set newArgs {}
+    foreach {key val} $args {
+	switch -- $key {
+	    -command { set commands [list $val] }
+	    default  { lappend newArgs $key $val }
+	}
     }
 
-    eval {::xmpp::pubsub::requestSubscriptions $xlib $service} $args \
-	 {-command [namespace code [list RequestSubscriptionsResult $xlib $service]]}
+    if {$node != ""} {
+	lappend newArgs -node $node
+    }
+
+    eval {::xmpp::pubsub::requestSubscriptions $xlib $service} $newArgs \
+	 {-command [namespace code [list RequestSubscriptionsResult $xlib $service \
+								    $commands]]}
 }
 
-proc pubsub::RequestSubscriptionsResult {xlib service status items} {
+proc pubsub::RequestSubscriptionsResult {xlib service commands status items} {
     debugmsg pubsub [info level 0]
 
     if {![string equal $status ok]} {



More information about the Tkabber-dev mailing list