Bug #285
Almost all IRC commands might suffer from a race condition
Status: | Closed | Start: | 01/09/2010 | |
Priority: | Urgent | Due date: | ||
Assigned to: | Mirco Bauer | % Done: | 100% |
|
Category: | Engine IRC | |||
Target version: | 0.7 | |||
Complexity: | High |
Found in Version: | ||
Votes: | 0 |
Description
Many IRC commands (in IrcProtocolManager) rely on CommandModel.FrontendManager.CurrentChat which is just wrong. As that property might not be up-to-date, it could be lacking behind or suddenly change which the result that those commands are using the wrong target (say channel or query)! All commands need to use the chat object that was used when the command was issued, which simply is: CommandModel.Chat
Associated revisions
Revision c464415366c7a19050fc66b36e80a0d1485baf3b
Marked FrontendManager.AddTextToCurrentChat() and .AddMessageToCurrentChat() as obsolete as they are unsafe! (refs: #285)
Revision 6931c2c0442d2038b53c1064c3a9a15826db27d7
Fixed CurrentChat race conditions in all engine and frontends commands (closes: #285)
- Replaced all cd.FrontendManager.CurrentChat calls with cd.Chat
- Replaced all fm.AddTextToCurrentChat() calls with fm.AddTextToChat(cd.Chat, ...)
History
Updated by Mirco Bauer 5465 days ago
The most used IRC command (Say) is not affected by this issue, which is probably the reason it wasn't noticed by anyone (yet).
Updated by Mirco Bauer 5464 days ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 6931c2c0442d2038b53c1064c3a9a15826db27d7.