From 543cf8a9e162a9a812770c628fa06c7a256752ee Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Mar 2001 05:17:47 +0000 Subject: Update. Add changes which were in this form in the original patch by Eric Norum . * include/rpc/rpc.h: Remove svc_fdset, rpc_createerr, svc_pollfd, and svc_max_pollfd. * sunrpc/rpc/rpc.h: Declare __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. Define svc_fdset, get_rpc_createerr, svc_pollfd, and svc_max_pollfd. * sunrpc/rpc_thread.c: Handle first thread special, it uses the global variables. Define __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_svc_fdset, __rpc_thread_createerr, __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. * sunrpc/clnt_gen.c: Replace use of rpc_createerr by call to get_rpc_createerr. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_simp.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/pm_getport.c: Likewise. --- sunrpc/clnt_udp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sunrpc/clnt_udp.c') diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index f951923052..bf98553b8d 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -128,9 +128,10 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, cl = (CLIENT *) mem_alloc (sizeof (CLIENT)); if (cl == NULL) { + struct rpc_createerr *ce = &get_rpc_createerr (); (void) fprintf (stderr, _("clntudp_create: out of memory\n")); - rpc_createerr.cf_stat = RPC_SYSTEMERROR; - rpc_createerr.cf_error.re_errno = errno; + ce->cf_stat = RPC_SYSTEMERROR; + ce->cf_error.re_errno = errno; goto fooy; } sendsz = ((sendsz + 3) / 4) * 4; @@ -138,9 +139,10 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, cu = (struct cu_data *) mem_alloc (sizeof (*cu) + sendsz + recvsz); if (cu == NULL) { + struct rpc_createerr *ce = &get_rpc_createerr (); (void) fprintf (stderr, _("clntudp_create: out of memory\n")); - rpc_createerr.cf_stat = RPC_SYSTEMERROR; - rpc_createerr.cf_error.re_errno = errno; + ce->cf_stat = RPC_SYSTEMERROR; + ce->cf_error.re_errno = errno; goto fooy; } cu->cu_outbuf = &cu->cu_inbuf[recvsz]; @@ -183,8 +185,9 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, *sockp = __socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (*sockp < 0) { - rpc_createerr.cf_stat = RPC_SYSTEMERROR; - rpc_createerr.cf_error.re_errno = errno; + struct rpc_createerr *ce = &get_rpc_createerr (); + ce->cf_stat = RPC_SYSTEMERROR; + ce->cf_error.re_errno = errno; goto fooy; } /* attempt to bind to prov port */ -- cgit v1.2.3