Reset the record lenght and received bytes once a record is finished. This fixes clients doing two RPCs over the same connection at the same time. Without this fix, we could end with a reply to old data. Submitted by: Frank van der Linden --- lib/libc/xdr/xdr_rec.c.orig Thu Jan 16 08:13:51 2003 +++ lib/libc/xdr/xdr_rec.c Mon Jan 27 22:47:50 2003 @@ -609,6 +609,7 @@ rstrm->fbtbc = rstrm->in_reclen; rstrm->in_boundry = rstrm->in_base + rstrm->in_reclen; rstrm->in_finger = rstrm->in_base; + rstrm->in_reclen = rstrm->in_received = 0; *statp = XPRT_MOREREQS; return TRUE; } @@ -685,6 +686,14 @@ int len; { size_t current; + + if (rstrm->nonblock) { + if (len > (int)(rstrm->in_boundry - rstrm->in_finger)) + return FALSE; + memcpy(addr, rstrm->in_finger, (size_t)len); + rstrm->in_finger += len; + return TRUE; + } while (len > 0) { current = (size_t)((long)rstrm->in_boundry -