mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Properly fixed group av issue.
This commit is contained in:
parent
6d00288d98
commit
2f93ba3a62
|
@ -1782,7 +1782,7 @@ static unsigned int lossy_packet_not_received(Group_c *g, int peer_index, uint16
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((uint16_t)(message_number - g->group[peer_index].bottom_lossy_number) <= MAX_LOSSY_COUNT) {
|
if ((uint16_t)(message_number - g->group[peer_index].bottom_lossy_number) < MAX_LOSSY_COUNT) {
|
||||||
if (g->group[peer_index].recv_lossy[message_number % MAX_LOSSY_COUNT]) {
|
if (g->group[peer_index].recv_lossy[message_number % MAX_LOSSY_COUNT]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1807,8 +1807,7 @@ static unsigned int lossy_packet_not_received(Group_c *g, int peer_index, uint16
|
||||||
if (top_distance < MAX_LOSSY_COUNT) {
|
if (top_distance < MAX_LOSSY_COUNT) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = g->group[peer_index].bottom_lossy_number + 1;
|
for (i = g->group[peer_index].bottom_lossy_number; i != (g->group[peer_index].bottom_lossy_number + top_distance);
|
||||||
i != (g->group[peer_index].bottom_lossy_number + top_distance + 1);
|
|
||||||
++i) {
|
++i) {
|
||||||
g->group[peer_index].recv_lossy[i % MAX_LOSSY_COUNT] = 0;
|
g->group[peer_index].recv_lossy[i % MAX_LOSSY_COUNT] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user