Reset sentlen when advancing
This commit is contained in:
parent
6fa0d98c99
commit
29b2348ca6
|
@ -35,11 +35,11 @@ void
|
||||||
packet_advance(struct packet *packet)
|
packet_advance(struct packet *packet)
|
||||||
{
|
{
|
||||||
packet->offset += packet->sentlen;
|
packet->offset += packet->sentlen;
|
||||||
|
packet->sentlen = 0;
|
||||||
if (packet->offset == packet->len) {
|
if (packet->offset == packet->len) {
|
||||||
/* Packet completed */
|
/* Packet completed */
|
||||||
packet->offset = 0;
|
packet->offset = 0;
|
||||||
packet->len = 0;
|
packet->len = 0;
|
||||||
packet->sentlen = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue