summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_messages.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-01-07 11:42:07 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-01-07 11:42:07 +0000
commitb37e0bd58a5969b42f6feaf073afcdfe43330b41 (patch)
tree03b98749a6bf16fa48d4955e54da14548e6105f9 /protocols/Tox/src/tox_messages.cpp
parent29c30826e448ba305fc7b1a7370043d09cb587f1 (diff)
Tox:
- fix own status showing on contact's client - some sync fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@11785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_messages.cpp')
-rw-r--r--protocols/Tox/src/tox_messages.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp
index d22fbc9f2d..39d37a47dc 100644
--- a/protocols/Tox/src/tox_messages.cpp
+++ b/protocols/Tox/src/tox_messages.cpp
@@ -44,6 +44,8 @@ int __cdecl CToxProto::SendMsg(MCONTACT hContact, int flags, const char* msg)
return 0;
}
+ WaitForSingleObject(hToxEvent, INFINITE);
+
int result = 0;
if (strncmp(msg, "/me ", 4) != 0)
{
@@ -53,6 +55,7 @@ int __cdecl CToxProto::SendMsg(MCONTACT hContact, int flags, const char* msg)
{
result = tox_send_action(tox, number, (uint8_t*)&msg[4], (uint16_t)strlen(msg) - 4);
}
+
if (result == 0)
{
debugLogA("CToxProto::SendMsg: could not to send message");
@@ -119,6 +122,8 @@ int __cdecl CToxProto::UserIsTyping(MCONTACT hContact, int type)
uint32_t number = tox_get_friend_number(tox, clientId.data());
if (number >= 0)
{
+ WaitForSingleObject(hToxEvent, INFINITE);
+
tox_set_user_is_typing(tox, number, type);
return 0;
}