diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-16 12:35:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-16 12:35:37 +0300 |
commit | eb84e01cdc1c9558f06a6cc99848d54fe19dc004 (patch) | |
tree | 913344f3a8b82b47c8732a454476306d227c349f /protocols/JabberG/src/jabber_misc.cpp | |
parent | 4ef73611c5a7ced80710666dd35131e8b6c8c219 (diff) |
fixes #2065 (Jabber: race condition in status changing)
Diffstat (limited to 'protocols/JabberG/src/jabber_misc.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_misc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index ed77e4595a..f41edad6c6 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -207,8 +207,10 @@ void CJabberProto::ResolveTransportNicks(const char *jid) void CJabberProto::SetServerStatus(int iNewStatus)
{
- if (!m_bJabberOnline)
+ if (!m_bJabberOnline) {
+ m_iDesiredStatus = m_iStatus;
return;
+ }
// change status
int oldStatus = m_iStatus;
@@ -230,8 +232,10 @@ void CJabberProto::SetServerStatus(int iNewStatus) return;
}
- if (m_iStatus == oldStatus)
+ if (m_iStatus == oldStatus) {
+ m_iDesiredStatus = m_iStatus;
return;
+ }
// send presence update
SendPresence(m_iStatus, true);
|