From 14bc93a967e62abf8cf2704725b6f76619399f83 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 28 Nov 2012 14:12:28 -0700 Subject: [BZ #14889] * sunrpc/rpc/svc.h (__svc_accept_failed): New prototype. * sunrpc/svc.c: Include time.h. (__svc_accept_failed): New function. * sunrpc/svc_tcp.c (rendezvous_request): If the accept fails for any reason other than EINTR, call __svc_accept_failed. * sunrpc/svc_udp.c (svcudp_recv): Similarly. * sunrpc/svc_unix.c (rendezvous_request): Similarly. --- sunrpc/svc_udp.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'sunrpc/svc_udp.c') diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 6c4d75a..3324e2a 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -3,6 +3,23 @@ * Server side for UDP/IP based RPC. (Does some caching in the hopes of * achieving execute-at-most-once semantics.) * + * Copyright (C) 2012 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * The GNU C Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the GNU C Library; if not, see + * . + * * Copyright (c) 2010, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without @@ -277,8 +294,12 @@ again: (int) su->su_iosz, 0, (struct sockaddr *) &(xprt->xp_raddr), &len); xprt->xp_addrlen = len; - if (rlen == -1 && errno == EINTR) - goto again; + if (rlen == -1) + { + if (errno == EINTR) + goto again; + __svc_accept_failed (); + } if (rlen < 16) /* < 4 32-bit ints? */ return FALSE; xdrs->x_op = XDR_DECODE; -- cgit v1.1