~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to sunrpc/svc_simple.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include <sys/socket.h>
42
42
#include <netdb.h>
43
43
 
44
 
#ifdef USE_IN_LIBIO
45
 
# include <wchar.h>
46
 
# include <libio/iolibio.h>
47
 
#endif
 
44
#include <wchar.h>
 
45
#include <libio/iolibio.h>
48
46
 
49
47
struct proglst_
50
48
  {
69
67
#endif
70
68
 
71
69
int
72
 
registerrpc (u_long prognum, u_long versnum, u_long procnum,
73
 
             char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
 
70
__registerrpc (u_long prognum, u_long versnum, u_long procnum,
 
71
               char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
74
72
{
75
73
  struct proglst_ *pl;
76
74
  char *buf;
85
83
    }
86
84
  if (transp == 0)
87
85
    {
88
 
      transp = INTUSE(svcudp_create) (RPC_ANYSOCK);
 
86
      transp = svcudp_create (RPC_ANYSOCK);
89
87
      if (transp == NULL)
90
88
        {
91
89
          buf = strdup (_("couldn't create an rpc server\n"));
123
121
  free (buf);
124
122
  return -1;
125
123
}
 
124
compat_symbol (libc, __registerrpc, registerrpc, GLIBC_2_0);
126
125
 
127
126
static void
128
127
universal (struct svc_req *rqstp, SVCXPRT *transp_l)
138
137
   */
139
138
  if (rqstp->rq_proc == NULLPROC)
140
139
    {
141
 
      if (INTUSE(svc_sendreply) (transp_l, (xdrproc_t)INTUSE(xdr_void),
142
 
                                 (char *) NULL) == FALSE)
 
140
      if (svc_sendreply (transp_l, (xdrproc_t)xdr_void,
 
141
                         (char *) NULL) == FALSE)
143
142
        {
144
143
          __write (STDERR_FILENO, "xxx\n", 4);
145
144
          exit (1);
155
154
        __bzero (xdrbuf, sizeof (xdrbuf));      /* required ! */
156
155
        if (!svc_getargs (transp_l, pl->p_inproc, xdrbuf))
157
156
          {
158
 
            INTUSE(svcerr_decode) (transp_l);
 
157
            svcerr_decode (transp_l);
159
158
            return;
160
159
          }
161
160
        outdata = (*(pl->p_progname)) (xdrbuf);
162
 
        if (outdata == NULL && pl->p_outproc != (xdrproc_t)INTUSE(xdr_void))
 
161
        if (outdata == NULL && pl->p_outproc != (xdrproc_t)xdr_void)
163
162
          /* there was an error */
164
163
          return;
165
 
        if (!INTUSE(svc_sendreply) (transp_l, pl->p_outproc, outdata))
 
164
        if (!svc_sendreply (transp_l, pl->p_outproc, outdata))
166
165
          {
167
166
            if (__asprintf (&buf, _("trouble replying to prog %d\n"),
168
167
                            pl->p_prognum) < 0)