mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed file transfer bug.
This should have been at the beginning of the loop, not the end.
This commit is contained in:
parent
725a52851d
commit
1d583fa111
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user