mirror of
https://github.com/TokTok/c-toxcore
synced 2026-06-06 19:52:29 +00:00
Fixed file transfer bug.
This should have been at the beginning of the loop, not the end.
This commit is contained in:
+5
-4
@@ -1464,6 +1464,11 @@ static void do_reqchunk_filecb(Messenger *m, int32_t friendnumber)
|
||||
}
|
||||
|
||||
while (ft->status == FILESTATUS_TRANSFERRING && (ft->paused == FILE_PAUSE_NOT)) {
|
||||
if (max_speed_reached(m->net_crypto, friend_connection_crypt_connection_id(m->fr_c,
|
||||
m->friendlist[friendnumber].friendcon_id))) {
|
||||
free_slots = 0;
|
||||
}
|
||||
|
||||
if (free_slots == 0)
|
||||
break;
|
||||
|
||||
@@ -1492,10 +1497,6 @@ static void do_reqchunk_filecb(Messenger *m, int32_t friendnumber)
|
||||
|
||||
--free_slots;
|
||||
|
||||
if (max_speed_reached(m->net_crypto, friend_connection_crypt_connection_id(m->fr_c,
|
||||
m->friendlist[friendnumber].friendcon_id))) {
|
||||
free_slots = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (num == 0)
|
||||
|
||||
Reference in New Issue
Block a user