Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/rpc Reset in_reclen and in_received after having re...
details: https://anonhg.NetBSD.org/src/rev/c8c0b09f06b4
branches: trunk
changeset: 542390:c8c0b09f06b4
user: fvdl <fvdl%NetBSD.org@localhost>
date: Mon Jan 27 20:56:45 2003 +0000
description:
Reset in_reclen and in_received after having received a full record in
the nonblocking case.
diffstat:
lib/libc/rpc/xdr_rec.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r c2cfb2b85d65 -r c8c0b09f06b4 lib/libc/rpc/xdr_rec.c
--- a/lib/libc/rpc/xdr_rec.c Mon Jan 27 20:55:56 2003 +0000
+++ b/lib/libc/rpc/xdr_rec.c Mon Jan 27 20:56:45 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xdr_rec.c,v 1.20 2003/01/18 11:29:07 thorpej Exp $ */
+/* $NetBSD: xdr_rec.c,v 1.21 2003/01/27 20:56:45 fvdl Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
static char *sccsid = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
static char *sccsid = "@(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: xdr_rec.c,v 1.20 2003/01/18 11:29:07 thorpej Exp $");
+__RCSID("$NetBSD: xdr_rec.c,v 1.21 2003/01/27 20:56:45 fvdl Exp $");
#endif
#endif
@@ -621,6 +621,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;
}
@@ -699,7 +700,7 @@
size_t current;
if (rstrm->nonblock) {
- if (len > rstrm->in_reclen)
+ if (len > (int)(rstrm->in_boundry - rstrm->in_finger))
return FALSE;
memcpy(addr, rstrm->in_finger, (size_t)len);
rstrm->in_finger += len;
Home |
Main Index |
Thread Index |
Old Index