From a9276f9db53affa2acbd8bc3f435285c1b838f87 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 17 Aug 2014 10:22:52 +0000 Subject: git-svn-id: http://svn.miranda-ng.org/main/trunk@10214 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'protocols') diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index fb0f8f1ce5..12601b43da 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -170,16 +170,15 @@ int __cdecl CToxProto::SendMsg(MCONTACT hContact, int flags, const char* msg) uint32_t number = tox_get_friend_number(tox, clientId.data()); - ULONG messageId = InterlockedIncrement(&hMessageProcess); + //ULONG messageId = InterlockedIncrement(&hMessageProcess); - int result = tox_send_message_withid(tox, number, messageId, (uint8_t*)msg, strlen(msg)); - if (result <= 0) + int result = tox_send_message(tox, number, (uint8_t*)msg, strlen(msg)); + if (result == 0) { - debugLogA("CToxProto::SendMsg: error sending message %i", result); - return 0; + debugLogA("CToxProto::SendMsg: could not to send message"); } - return messageId; + return result; } int __cdecl CToxProto::SendUrl(MCONTACT hContact, int flags, const char* url) { return 0; } -- cgit v1.2.3