diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-22 20:16:35 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-22 20:16:35 +0000 |
commit | 0cf817868e112373e8ca0620e312755fe5baa89b (patch) | |
tree | dc872defa96901779cbebfbf23b139df79b75799 /protocols/Tox/src/tox_proto.cpp | |
parent | 55fb27f8953f2b311abcc0efece88dd912ba4b1e (diff) |
Tox: fixed status changing
git-svn-id: http://svn.miranda-ng.org/main/trunk@10306 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 585ff4496b..69880a64b7 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -221,11 +221,11 @@ int __cdecl CToxProto::SetApparentMode(MCONTACT hContact, int mode) { return 0; int __cdecl CToxProto::SetStatus(int iNewStatus)
{
- if (iNewStatus == this->m_iDesiredStatus)
+ if (iNewStatus == m_iDesiredStatus)
return 0;
- int old_status = this->m_iStatus;
- this->m_iDesiredStatus = iNewStatus;
+ int old_status = m_iStatus;
+ m_iDesiredStatus = iNewStatus;
if (iNewStatus == ID_STATUS_OFFLINE)
{
@@ -239,7 +239,6 @@ int __cdecl CToxProto::SetStatus(int iNewStatus) }
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
}
else
{
@@ -253,6 +252,7 @@ int __cdecl CToxProto::SetStatus(int iNewStatus) else
{
// set tox status
+ m_iStatus = iNewStatus;
if (tox_set_user_status(tox, MirandaToToxStatus(iNewStatus)) == 0)
{
SaveToxData();
@@ -261,7 +261,6 @@ int __cdecl CToxProto::SetStatus(int iNewStatus) }
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
-
return 0;
}
|