diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-01-19 06:13:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-01-19 06:13:17 +0000 |
commit | 15877bd0e2177fe045e9a7097a7b836053b1a491 (patch) | |
tree | 70cd0ca7434e4370f041308979009d3a50eb353c /protocols/Tox/src/tox_contacts.cpp | |
parent | a8af35bf6e3de34405ce5dbc3b035039a9ee4806 (diff) |
Tox: fixed resuming for broken files
git-svn-id: http://svn.miranda-ng.org/main/trunk@11876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_contacts.cpp')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 5cd56e099d..30c9fcc486 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -273,22 +273,24 @@ void CToxProto::OnConnectionStatusChanged(Tox *tox, const int friendNumber, cons tox_send_avatar_info(proto->tox, friendNumber);
proto->delSetting(hContact, "Auth");
- for (std::map<uint8_t, FileTransferParam*>::iterator it = proto->transfers.begin(); it != proto->transfers.end(); it++)
+ for (int i = 0; i < proto->transfers->Count(); i++)
{
// only for receiving
- if (it->second->friendNumber == friendNumber && it->second->GetDirection() == 1)
+ FileTransferParam *transfer = proto->transfers->At(i);
+ if (transfer->friendNumber == friendNumber && transfer->GetDirection() == 1)
{
- it->second->Broken(tox);
+ transfer->Resume(tox);
}
}
}
else
{
- for (std::map<uint8_t, FileTransferParam*>::iterator it = proto->transfers.begin(); it != proto->transfers.end(); it++)
+ for (int i = 0; i < proto->transfers->Count(); i++)
{
- if (it->second->friendNumber == friendNumber)
+ FileTransferParam *transfer = proto->transfers->At(i);
+ if (transfer->friendNumber == friendNumber)
{
- it->second->status = PAUSED;
+ transfer->status = PAUSED;
}
}
}
|