X-Git-Url: http://git.meshlink.io/?p=utcp;a=blobdiff_plain;f=utcp.c;h=50c7e364a33b2ee68a8b5d95b5bdb3d106287756;hp=72bb41d021f003e49897d24b92bcfda0456846cb;hb=36994569d1ba6839207761591964189d189c92d1;hpb=1cd490633b3975e51163a96eadfa9b7490dc93a0 diff --git a/utcp.c b/utcp.c index 72bb41d..50c7e36 100644 --- a/utcp.c +++ b/utcp.c @@ -1252,6 +1252,19 @@ synack: // Otherwise, continue processing. len = 0; } + } else { +#if UTCP_DEBUG + int32_t rcv_offset = seqdiff(hdr.seq, c->rcv.nxt); + + if(rcv_offset) { + debug(c, "packet out of order, offset %u bytes", rcv_offset); + } + + if(rcv_offset >= 0) { + c->rcv.nxt = hdr.seq + len; + } + +#endif } c->snd.wnd = hdr.wnd; // TODO: move below