[Tkabber-dev] r1075 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 30 14:32:16 MSD 2007


Author: sergei
Date: 2007-03-30 14:32:16 +0400 (Fri, 30 Mar 2007)
New Revision: 1075

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/messages.tcl
Log:
	* messages.tcl: Fixed race condition when receiving several
	  subscription requests.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-03-30 10:27:35 UTC (rev 1074)
+++ trunk/tkabber/ChangeLog	2007-03-30 10:32:16 UTC (rev 1075)
@@ -7,6 +7,9 @@
 	* plugins/chat/histool.tcl: Display chat log on <Return> in JID
 	  list tab. Also, don't export listbox selection.
 
+	* messages.tcl: Fixed race condition when receiving several
+	  subscription requests.
+
 2007-03-29  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/de.msg: Updated German translation (thanks to Roger

Modified: trunk/tkabber/messages.tcl
===================================================================
--- trunk/tkabber/messages.tcl	2007-03-30 10:27:35 UTC (rev 1074)
+++ trunk/tkabber/messages.tcl	2007-03-30 10:32:16 UTC (rev 1075)
@@ -37,7 +37,7 @@
             $subject $body $x
     }
 
-    set mw .msgshow$msgid
+    set mw .msgshow[incr msgid]
     toplevel $mw -class Message
     wm group $mw .
 
@@ -205,8 +205,6 @@
 	hook::run open_message_post_hook $mw $connid $from
     }
 
-    incr msgid
-
     BWidget::place $mw 0 0 center
     wm deiconify $mw
 }
@@ -333,7 +331,7 @@
 	}
     }
 
-    set mw .msgsend$msgid
+    set mw .msgsend[incr msgid]
     toplevel $mw -class Message
     wm group $mw .
 
@@ -451,8 +449,6 @@
         focus $mw.f.to
     }
 
-    incr msgid
-
     hook::run open_message_post_hook $mw $connid $to
 
     BWidget::place $mw 0 0 center
@@ -601,7 +597,7 @@
         }
     }
 
-    set mw .subscshow$msgid
+    set mw .subscshow[incr msgid]
     toplevel $mw -class Message
     wm group $mw .
     wm withdraw $mw
@@ -665,8 +661,6 @@
 
     BWidget::place $mw 0 0 center
     wm deiconify $mw
-
-    incr msgid
 }
 
 hook::add client_presence_hook message::show_subscribe_dialog
@@ -801,7 +795,7 @@
     }
     set send_subscribe_connid [jlib::connection_jid $connid]
 
-    set mw .subscsend$msgid
+    set mw .subscsend[incr msgid]
     toplevel $mw -class Message
     wm group $mw .
     wm withdraw $mw
@@ -869,7 +863,6 @@
 
     BWidget::place $mw 0 0 center
     wm deiconify $mw
-    incr msgid
 }
 
 ###############################################################################



More information about the Tkabber-dev mailing list