diff --git a/src/packet.c b/src/packet.c index 4aa8e87..fe58b57 100644 --- a/src/packet.c +++ b/src/packet.c @@ -35,11 +35,11 @@ void packet_advance(struct packet *packet) { packet->offset += packet->sentlen; + packet->sentlen = 0; if (packet->offset == packet->len) { /* Packet completed */ packet->offset = 0; packet->len = 0; - packet->sentlen = 0; } }