This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] sunrpc patch



Hi,

here is a RPC for sunrpc (glibc 2.1 and 2.2). The first one
fixes second pard of bug 1549, the first part we have already
discussed very often. The second patch removes the unused
defines from rpc_des.h.

  Thorsten
-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/       kukuk@suse.de
SuSE GmbH            Schanzaeckerstr. 10            90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.
2000-01-22  Thorsten Kukuk  <kukuk@suse.de>

	* sunrpc/xdr_rec.c: Don't set frag_sent if no more data,
	  fixes part 2 of bug 1549.
	* sunrpc/rpc_des.h: Remove unsused defines

--- glibc-2.1/sunrpc/xdr_rec.c	Thu Apr 15 15:54:37 1999
+++ glibc-2.1/sunrpc/xdr_rec.c	Sat Jan 22 20:03:26 2000
@@ -65,8 +65,7 @@
 static bool_t xdrrec_getint32 (XDR *, int32_t *);
 static bool_t xdrrec_putint32 (XDR *, const int32_t *);
 
-static const struct xdr_ops xdrrec_ops =
-{
+static const struct xdr_ops xdrrec_ops = {
   xdrrec_getlong,
   xdrrec_putlong,
   xdrrec_getbytes,
@@ -288,7 +287,7 @@
       rstrm->out_finger += current;
       addr += current;
       len -= current;
-      if (rstrm->out_finger == rstrm->out_boundry)
+      if (rstrm->out_finger == rstrm->out_boundry && len > 0)
 	{
 	  rstrm->frag_sent = TRUE;
 	  if (!flush_out (rstrm, FALSE))
@@ -464,8 +463,7 @@
  * this procedure to guarantee proper record alignment.
  */
 bool_t
-xdrrec_skiprecord (xdrs)
-     XDR *xdrs;
+xdrrec_skiprecord (XDR *xdrs)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
 
@@ -487,8 +485,7 @@
  * after consuming the rest of the current record.
  */
 bool_t
-xdrrec_eof (xdrs)
-     XDR *xdrs;
+xdrrec_eof (XDR *xdrs)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
 
@@ -512,9 +509,7 @@
  * pipelined procedure calls.)  TRUE => immediate flush to tcp connection.
  */
 bool_t
-xdrrec_endofrecord (xdrs, sendnow)
-     XDR *xdrs;
-     bool_t sendnow;
+xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
 {
   RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
   u_long len;		/* fragment length */
--- glibc-2.1/sunrpc/rpc/rpc_des.h	Tue Mar 24 11:37:33 1998
+++ glibc-2.1/sunrpc/rpc/rpc_des.h	Sat Jan 22 20:27:37 2000
@@ -1,4 +1,3 @@
-/*  @(#)des.h   2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI  */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -69,15 +68,5 @@
 #define des_data UDES.UDES_data	/* direct data here if quick */
 #define des_buf	UDES.UDES_buf	/* otherwise, pointer to data */
   };
-
-/*
- * Encrypt an arbitrary sized buffer
- */
-#define	DESIOCBLOCK	_IOWR(d, 6, struct desparams)
-
-/* 
- * Encrypt of small amount of data, quickly
- */
-#define DESIOCQUICK	_IOWR(d, 7, struct desparams)
 
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]