Properly fixed group av issue.

This commit is contained in:
irungentoo 2014-11-12 12:58:17 -05:00
parent 6d00288d98
commit 2f93ba3a62
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -1782,7 +1782,7 @@ static unsigned int lossy_packet_not_received(Group_c *g, int peer_index, uint16
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]) {
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) {
unsigned int i;
for (i = g->group[peer_index].bottom_lossy_number + 1;
i != (g->group[peer_index].bottom_lossy_number + top_distance + 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].recv_lossy[i % MAX_LOSSY_COUNT] = 0;
}