diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-16 14:03:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-16 14:03:24 +0000 |
commit | 8bd2456f654ef5eea44fcf4ad6ce5f7107f7d829 (patch) | |
tree | 8ae03049734c96a5feba398f5c142d9a4213d640 /protocols/VKontakte/src/vk_status.cpp | |
parent | c3908b9c6d53a6aef5e25975d3b336974e6dd610 (diff) |
IsStatusConnecting() - useful macro
git-svn-id: http://svn.miranda-ng.org/main/trunk@12860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_status.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_status.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_status.cpp b/protocols/VKontakte/src/vk_status.cpp index 6e9670e13d..e7d6ee7cc6 100644 --- a/protocols/VKontakte/src/vk_status.cpp +++ b/protocols/VKontakte/src/vk_status.cpp @@ -37,7 +37,7 @@ int CVkProto::SetStatus(int iNewStatus) ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
debugLogA("CVkProto::SetStatus (1) iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d oldStatus = %d", iNewStatus, m_iStatus, m_iDesiredStatus, oldStatus);
}
- else if (m_hWorkerThread == NULL && !(m_iStatus >= ID_STATUS_CONNECTING && m_iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
+ else if (m_hWorkerThread == NULL && !IsStatusConnecting(m_iStatus)) {
m_iStatus = ID_STATUS_CONNECTING;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
debugLogA("CVkProto::SetStatus (2) iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d oldStatus = %d", iNewStatus, m_iStatus, m_iDesiredStatus, oldStatus);
@@ -50,7 +50,7 @@ int CVkProto::SetStatus(int iNewStatus) else {
debugLogA("CVkProto::SetStatus (4) iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d oldStatus = %d", iNewStatus, m_iStatus, m_iDesiredStatus, oldStatus);
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
- if (!(m_iStatus >= ID_STATUS_CONNECTING && m_iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES))
+ if (!IsStatusConnecting(m_iStatus))
m_iDesiredStatus = m_iStatus;
debugLogA("CVkProto::SetStatus (5) iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d oldStatus = %d", iNewStatus, m_iStatus, m_iDesiredStatus, oldStatus);
}
|