diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Tox/bin/x64/libtox.dll | bin | 1506415 -> 1872495 bytes | |||
-rw-r--r-- | protocols/Tox/bin/x64/libtox.pdb | bin | 838656 -> 838656 bytes | |||
-rw-r--r-- | protocols/Tox/bin/x86/libtox.dll | bin | 1176175 -> 1671791 bytes | |||
-rw-r--r-- | protocols/Tox/bin/x86/libtox.pdb | bin | 871424 -> 879616 bytes | |||
-rw-r--r-- | protocols/Tox/src/tox_messages.cpp | 5 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 1 | ||||
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 21 | ||||
-rw-r--r-- | protocols/Tox/src/version.h | 4 |
8 files changed, 26 insertions, 5 deletions
diff --git a/protocols/Tox/bin/x64/libtox.dll b/protocols/Tox/bin/x64/libtox.dll Binary files differindex db8a5cfa73..28023f7f2f 100644 --- a/protocols/Tox/bin/x64/libtox.dll +++ b/protocols/Tox/bin/x64/libtox.dll diff --git a/protocols/Tox/bin/x64/libtox.pdb b/protocols/Tox/bin/x64/libtox.pdb Binary files differindex d3bf9b7963..91962e0052 100644 --- a/protocols/Tox/bin/x64/libtox.pdb +++ b/protocols/Tox/bin/x64/libtox.pdb diff --git a/protocols/Tox/bin/x86/libtox.dll b/protocols/Tox/bin/x86/libtox.dll Binary files differindex d4fbf5eecf..13b94810d7 100644 --- a/protocols/Tox/bin/x86/libtox.dll +++ b/protocols/Tox/bin/x86/libtox.dll diff --git a/protocols/Tox/bin/x86/libtox.pdb b/protocols/Tox/bin/x86/libtox.pdb Binary files differindex c655010bf8..0a6a9728eb 100644 --- a/protocols/Tox/bin/x86/libtox.pdb +++ b/protocols/Tox/bin/x86/libtox.pdb diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp index f6a1dd8102..aa5f2a1935 100644 --- a/protocols/Tox/src/tox_messages.cpp +++ b/protocols/Tox/src/tox_messages.cpp @@ -46,7 +46,7 @@ void CToxProto::SendMessageAsync(void *arg) int32_t friendNumber = GetToxFriendNumber(param->hContact);
if (friendNumber == UINT32_MAX)
- ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)param->hMessage, 0);
+ ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)param->hMessage, (LPARAM)_T2A(ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND)));
size_t msgLen = mir_strlen(param->message);
uint8_t *msg = (uint8_t*)param->message;
@@ -62,9 +62,8 @@ void CToxProto::SendMessageAsync(void *arg) if (sendError != TOX_ERR_FRIEND_SEND_MESSAGE_OK)
{
logger->Log(__FUNCTION__": failed to send message for %d (%d)", friendNumber, sendError);
- ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)param->hMessage, 0);
+ ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)param->hMessage, (LPARAM)_T2A(ToxErrorToString(sendError)));
}
-
uint64_t messageId = (((int64_t)friendNumber) << 32) | ((int64_t)messageNumber);
messages[messageId] = param->hMessage;
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index aebf85148e..b12488e2b3 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -278,6 +278,7 @@ private: static int ToxToMirandaStatus(TOX_USER_STATUS userstatus);
static TCHAR* ToxErrorToString(TOX_ERR_NEW error);
+ static TCHAR* ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error);
static void ShowNotification(const TCHAR *message, int flags = 0, MCONTACT hContact = NULL);
static void ShowNotification(const TCHAR *caption, const TCHAR *message, int flags = 0, MCONTACT hContact = NULL);
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index da18be8bdb..0ad5015340 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -82,6 +82,27 @@ TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error) }
}
+TCHAR* CToxProto::ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error)
+{
+ switch (error)
+ {
+ case TOX_ERR_FRIEND_SEND_MESSAGE_NULL: + return TranslateT("One of the arguments is missing"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND: + return TranslateT("The friend number did not designate a valid friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED: + return TranslateT("This client is currently not connected to the friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ: + return TranslateT("An allocation error occurred while increasing the send queue size"); + case TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG: + return TranslateT("Message length exceeded TOX_MAX_MESSAGE_LENGTH"); + case TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY:
+ return TranslateT("Attempted to send a zero-length message");
+ default:
+ return TranslateT("Unknown error");
+ }
+}
+
void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact)
{
if (Miranda_Terminated())
diff --git a/protocols/Tox/src/version.h b/protocols/Tox/src/version.h index 977e7295a4..32e80a4155 100644 --- a/protocols/Tox/src/version.h +++ b/protocols/Tox/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
#define __RELEASE_NUM 1
-#define __BUILD_NUM 15
+#define __BUILD_NUM 16
#include <stdver.h>
@@ -11,4 +11,4 @@ #define __AUTHOR "Miranda NG Team"
#define __AUTHOREMAIL ""
#define __AUTHORWEB "http://miranda-ng.org/p/Tox/"
-#define __COPYRIGHT "© 2014-15 Miranda NG Team"
+#define __COPYRIGHT "� 2014-15 Miranda NG Team"
|