X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=utcp.c;h=7624aa576d39c8753c810cea4c4f8643c377d3d4;hb=5d6a4bd71c683042495038e9679cbf7c80d816fd;hp=d846fb1965bd4384bef7239ae0781e08fb257d8f;hpb=619f181e8507d7195b5f855d9fb7922e956f8233;p=utcp diff --git a/utcp.c b/utcp.c index d846fb1..7624aa5 100644 --- a/utcp.c +++ b/utcp.c @@ -500,6 +500,7 @@ static void retransmit(struct utcp_connection *c) { len--; pkt->hdr.ctl |= FIN; } + c->snd.nxt = c->snd.una + len; buffer_copy(&c->sndbuf, pkt->data, 0, len); print_packet(c->utcp, "rtrx", pkt, sizeof pkt->hdr + len); utcp->send(utcp, pkt, sizeof pkt->hdr + len); @@ -988,7 +989,7 @@ reset: } int utcp_shutdown(struct utcp_connection *c, int dir) { - debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c->snd.last); + debug("%p shutdown %d at %u\n", c ? c->utcp : NULL, dir, c ? c->snd.last : 0); if(!c) { errno = EFAULT; return -1;