summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-05-16 07:36:55 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-05-16 07:36:55 +0000
commit9f7ed03494fa22e194e3ee553f3778d68b7ae206 (patch)
tree82723009792acaddd15aeac0d036da28fb944e9f /protocols
parent2a88f2274cd799a5478905e47d0f4d0e791440b4 (diff)
Tox: attempt to fix file resuming
git-svn-id: http://svn.miranda-ng.org/main/trunk@13613 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Tox/bin/x64/libtox.dllbin4033135 -> 4033135 bytes
-rw-r--r--protocols/Tox/bin/x64/libtox.pdbbin650240 -> 650240 bytes
-rw-r--r--protocols/Tox/bin/x86/libtox.dllbin3372655 -> 3372655 bytes
-rw-r--r--protocols/Tox/bin/x86/libtox.pdbbin642048 -> 642048 bytes
-rw-r--r--protocols/Tox/src/tox_contacts.cpp10
-rw-r--r--protocols/Tox/src/tox_transfer.cpp5
-rw-r--r--protocols/Tox/src/version.h2
7 files changed, 6 insertions, 11 deletions
diff --git a/protocols/Tox/bin/x64/libtox.dll b/protocols/Tox/bin/x64/libtox.dll
index df55ba49d0..5678877a99 100644
--- a/protocols/Tox/bin/x64/libtox.dll
+++ b/protocols/Tox/bin/x64/libtox.dll
Binary files differ
diff --git a/protocols/Tox/bin/x64/libtox.pdb b/protocols/Tox/bin/x64/libtox.pdb
index fadd0cbd88..7b78fbe12b 100644
--- a/protocols/Tox/bin/x64/libtox.pdb
+++ b/protocols/Tox/bin/x64/libtox.pdb
Binary files differ
diff --git a/protocols/Tox/bin/x86/libtox.dll b/protocols/Tox/bin/x86/libtox.dll
index 52001d8a5f..33fa556c57 100644
--- a/protocols/Tox/bin/x86/libtox.dll
+++ b/protocols/Tox/bin/x86/libtox.dll
Binary files differ
diff --git a/protocols/Tox/bin/x86/libtox.pdb b/protocols/Tox/bin/x86/libtox.pdb
index c11e80feb8..f3452111fd 100644
--- a/protocols/Tox/bin/x86/libtox.pdb
+++ b/protocols/Tox/bin/x86/libtox.pdb
Binary files differ
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index 0cda5f4783..311f5d0ce8 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -9,17 +9,13 @@ void CToxProto::SetContactStatus(MCONTACT hContact, WORD status)
{
WORD oldStatus = GetContactStatus(hContact);
if (oldStatus != status)
- {
setWord(hContact, "Status", status);
- }
}
void CToxProto::SetAllContactsStatus(WORD status)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
- {
SetContactStatus(hContact, status);
- }
}
MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent)
@@ -62,9 +58,7 @@ MCONTACT CToxProto::GetContact(const char *pubKey)
ptrA contactPubKey(getStringA(hContact, TOX_SETTINGS_ID));
// check only public key part of address
if (strnicmp(pubKey, contactPubKey, TOX_PUBLIC_KEY_SIZE) == 0)
- {
break;
- }
}
return hContact;
}
@@ -80,9 +74,7 @@ MCONTACT CToxProto::AddContact(const char *address, const TCHAR *dnsId, bool isT
setString(hContact, TOX_SETTINGS_ID, address);
if (dnsId && mir_tstrlen(dnsId))
- {
setTString(hContact, TOX_SETTINGS_DNS, dnsId);
- }
DBVARIANT dbv;
if (!getTString(TOX_SETTINGS_GROUP, &dbv))
@@ -108,9 +100,7 @@ uint32_t CToxProto::GetToxFriendNumber(MCONTACT hContact)
TOX_ERR_FRIEND_BY_PUBLIC_KEY error;
uint32_t friendNumber = tox_friend_by_public_key(tox, pubKey, &error);
if (error != TOX_ERR_FRIEND_BY_PUBLIC_KEY_OK)
- {
debugLogA(__FUNCTION__": failed to get friend number (%d)", error);
- }
return friendNumber;
}
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp
index cc215c173e..5a1844383b 100644
--- a/protocols/Tox/src/tox_transfer.cpp
+++ b/protocols/Tox/src/tox_transfer.cpp
@@ -269,6 +269,11 @@ void CToxProto::OnFileSendData(Tox*, uint32_t friendNumber, uint32_t fileNumber,
TOX_ERR_FILE_SEND_CHUNK error;
if (!tox_file_send_chunk(proto->tox, friendNumber, fileNumber, position, data, length, &error))
{
+ if (error == TOX_ERR_FILE_SEND_CHUNK_FRIEND_NOT_CONNECTED)
+ {
+ mir_free(data);
+ return;
+ }
proto->debugLogA(__FUNCTION__": failed to send file chunk (%d)", error);
proto->ProtoBroadcastAck(transfer->pfts.hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)transfer, 0);
tox_file_control(proto->tox, transfer->friendNumber, transfer->fileNumber, TOX_FILE_CONTROL_CANCEL, NULL);
diff --git a/protocols/Tox/src/version.h b/protocols/Tox/src/version.h
index e6fbbb213f..5273fdb637 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 2
+#define __BUILD_NUM 3
#include <stdver.h>