Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 19:08:10 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r200226 - stable/6/lib/libc/rpc
Message-ID:  <200912071908.nB7J8AOe062952@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon Dec  7 19:08:10 2009
New Revision: 200226
URL: http://svn.freebsd.org/changeset/base/200226

Log:
  MFC 200061:
  The fd_mask type is an unsigned long, not an int, so treat the mask as a
  long instead of an int when examining the results of select() to look for
  RPC requests.  Previously this routine would ignore RPC requests to sockets
  whose file descriptor mod 64 was greater than 31 on a 64-bit platform.

Modified:
  stable/6/lib/libc/rpc/svc.c
Directory Properties:
  stable/6/lib/libc/   (props changed)

Modified: stable/6/lib/libc/rpc/svc.c
==============================================================================
--- stable/6/lib/libc/rpc/svc.c	Mon Dec  7 19:07:58 2009	(r200225)
+++ stable/6/lib/libc/rpc/svc.c	Mon Dec  7 19:08:10 2009	(r200226)
@@ -598,8 +598,8 @@ svc_getreqset(readfds)
 
 	maskp = readfds->fds_bits;
 	for (sock = 0; sock < FD_SETSIZE; sock += NFDBITS) {
-	    for (mask = *maskp++; (bit = ffs(mask)) != 0;
-		mask ^= (1 << (bit - 1))) {
+	    for (mask = *maskp++; (bit = ffsl(mask)) != 0;
+		mask ^= (1ul << (bit - 1))) {
 		/* sock has input waiting */
 		fd = sock + bit - 1;
 		svc_getreq_common(fd);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912071908.nB7J8AOe062952>