Fixed file transfer bug.

This should have been at the beginning of the loop, not the end.
This commit is contained in:
irungentoo 2015-03-27 21:49:11 -04:00
parent 725a52851d
commit 1d583fa111
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -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)