Deleted Added
full compact
svc_vc.c (74462) svc_vc.c (74536)
1/* $NetBSD: svc_vc.c,v 1.7 2000/08/03 00:01:53 fvdl Exp $ */
1/* $NetBSD: svc_vc.c,v 1.7 2000/08/03 00:01:53 fvdl Exp $ */
2/* $FreeBSD: head/lib/libc/rpc/svc_vc.c 74462 2001-03-19 12:50:13Z alfred $ */
2/* $FreeBSD: head/lib/libc/rpc/svc_vc.c 74536 2001-03-20 20:28:09Z alfred $ */
3
4/*
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.

--- 396 unchanged lines hidden (view full) ---

407 struct cmsghdr *cmp;
408 struct sockcred *sc;
409
410 xprt = (SVCXPRT *)(void *)xprtp;
411 assert(xprt != NULL);
412
413 sock = xprt->xp_fd;
414
3
4/*
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.

--- 396 unchanged lines hidden (view full) ---

407 struct cmsghdr *cmp;
408 struct sockcred *sc;
409
410 xprt = (SVCXPRT *)(void *)xprtp;
411 assert(xprt != NULL);
412
413 sock = xprt->xp_fd;
414
415 do {
416 pollfd.fd = sock;
417 pollfd.events = POLLIN;
415 do {
416 pollfd.fd = sock;
417 pollfd.events = POLLIN;
418 pollfd.revents = 0;
418 pollfd.revents = 0;
419 switch (_poll(&pollfd, 1, milliseconds)) {
420 case -1:
421 if (errno == EINTR) {
422 continue;
423 }
424 /*FALLTHROUGH*/
425 case 0:
426 goto fatal_err;
427
428 default:
429 break;
430 }
431 } while ((pollfd.revents & POLLIN) == 0);
419 switch (_poll(&pollfd, 1, milliseconds)) {
420 case -1:
421 if (errno == EINTR)
422 continue;
423 /*FALLTHROUGH*/
424 case 0:
425 goto fatal_err;
426 default:
427 break;
428 }
429 } while ((pollfd.revents & POLLIN) == 0);
432
433 sa = (struct sockaddr *)xprt->xp_rtaddr.buf;
434 if (sa->sa_family == AF_LOCAL) {
435 if ((len = __msgread(sock, buf, len)) > 0) {
436 cm = (struct cmessage *)xprt->xp_verf.oa_base;
437 cmp = &cm->cmsg;
438 sc = (struct sockcred *)(void *)CMSG_DATA(cmp);
439 xprt->xp_p2 = sc;

--- 250 unchanged lines hidden ---
430
431 sa = (struct sockaddr *)xprt->xp_rtaddr.buf;
432 if (sa->sa_family == AF_LOCAL) {
433 if ((len = __msgread(sock, buf, len)) > 0) {
434 cm = (struct cmessage *)xprt->xp_verf.oa_base;
435 cmp = &cm->cmsg;
436 sc = (struct sockcred *)(void *)CMSG_DATA(cmp);
437 xprt->xp_p2 = sc;

--- 250 unchanged lines hidden ---