[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#32903: 64bit bugfix in the RPC library



Package: libc6
Version: 2.0.7.19981211-2
Severity: normal


Hello,

Below is a patch  that solves some "RPC timed out" problems on Alpha,
they were occuring only if timeofday was set before the year 1970.

Loic

diff -r -u glibc-2.0.7.19981211/sunrpc/clnt_tcp.c glibc-2.0.7.19981211.new/sunrpc/clnt_tcp.c
--- glibc-2.0.7.19981211/sunrpc/clnt_tcp.c	Sat Dec 12 05:52:18 1998
+++ glibc-2.0.7.19981211.new/sunrpc/clnt_tcp.c	Fri Feb  5 00:53:55 1999
@@ -289,7 +289,7 @@
 				continue;
 			return (ct->ct_error.re_status);
 		}
-		if (reply_msg.rm_xid == x_id)
+		if ((u_int32_t)reply_msg.rm_xid == (u_int32_t)x_id)
 			break;
 	}
 
diff -r -u glibc-2.0.7.19981211/sunrpc/pmap_rmt.c glibc-2.0.7.19981211.new/sunrpc/pmap_rmt.c
--- glibc-2.0.7.19981211/sunrpc/pmap_rmt.c	Sat Dec 12 05:52:29 1998
+++ glibc-2.0.7.19981211.new/sunrpc/pmap_rmt.c	Fri Feb  5 00:53:15 1999
@@ -359,7 +359,7 @@
 		 */
 		xdrmem_create(xdrs, inbuf, (u_int)inlen, XDR_DECODE);
 		if (xdr_replymsg(xdrs, &msg)) {
-			if ((msg.rm_xid == xid) &&
+			if (((u_int32_t)msg.rm_xid == (u_int32_t)xid) &&
 				(msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
 				(msg.acpted_rply.ar_stat == SUCCESS)) {
 				raddr.sin_port = htons((u_short)port);
@@ -369,7 +369,7 @@
 		} else {
 #ifdef notdef
 			/* some kind of deserialization problem ... */
-			if (msg.rm_xid == xid)
+			if ((u_int32_t)msg.rm_xid == (u_int32_t)xid)
 				fprintf(stderr, "Broadcast deserialization problem");
 			/* otherwise, just random garbage */
 #endif


Reply to: