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

« back to all changes in this revision

Viewing changes to sunrpc/svc_unix.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:
46
46
#include <errno.h>
47
47
#include <stdlib.h>
48
48
#include <libintl.h>
49
 
 
50
 
#ifdef USE_IN_LIBIO
51
 
# include <wchar.h>
52
 
#endif
 
49
#include <wchar.h>
53
50
 
54
51
/*
55
52
 * Ops vector for AF_UNIX based rpc service handle
187
184
  xprt_register (xprt);
188
185
  return xprt;
189
186
}
 
187
libc_hidden_nolink (svcunix_create, GLIBC_2_1)
190
188
 
191
189
/*
192
190
 * Like svunix_create(), except the routine takes any *open* UNIX file
197
195
{
198
196
  return makefd_xprt (fd, sendsize, recvsize);
199
197
}
 
198
libc_hidden_nolink (svcunixfd_create, GLIBC_2_1)
200
199
 
201
200
static SVCXPRT *
202
201
internal_function
216
215
      return NULL;
217
216
    }
218
217
  cd->strm_stat = XPRT_IDLE;
219
 
  INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize,
220
 
                         (caddr_t) xprt, readunix, writeunix);
 
218
  xdrrec_create (&(cd->xdrs), sendsize, recvsize,
 
219
                 (caddr_t) xprt, readunix, writeunix);
221
220
  xprt->xp_p2 = NULL;
222
221
  xprt->xp_p1 = (caddr_t) cd;
223
222
  xprt->xp_verf.oa_base = cd->verf_body;
332
331
  if (len >= 0)
333
332
    {
334
333
      if (msg.msg_flags & MSG_CTRUNC || len == 0)
335
 
        return 0;
 
334
        return 0;
336
335
      else
337
 
        return len;
 
336
        return len;
338
337
    }
339
338
  if (errno == EINTR)
340
339
    goto restart;
460
459
 
461
460
  if (cd->strm_stat == XPRT_DIED)
462
461
    return XPRT_DIED;
463
 
  if (!INTUSE(xdrrec_eof) (&(cd->xdrs)))
 
462
  if (!xdrrec_eof (&(cd->xdrs)))
464
463
    return XPRT_MOREREQS;
465
464
  return XPRT_IDLE;
466
465
}
472
471
  XDR *xdrs = &(cd->xdrs);
473
472
 
474
473
  xdrs->x_op = XDR_DECODE;
475
 
  INTUSE(xdrrec_skiprecord) (xdrs);
476
 
  if (INTUSE(xdr_callmsg) (xdrs, msg))
 
474
  xdrrec_skiprecord (xdrs);
 
475
  if (xdr_callmsg (xdrs, msg))
477
476
    {
478
477
      cd->x_id = msg->rm_xid;
479
478
      /* set up verifiers */
513
512
 
514
513
  xdrs->x_op = XDR_ENCODE;
515
514
  msg->rm_xid = cd->x_id;
516
 
  stat = INTUSE(xdr_replymsg) (xdrs, msg);
517
 
  (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
 
515
  stat = xdr_replymsg (xdrs, msg);
 
516
  (void) xdrrec_endofrecord (xdrs, TRUE);
518
517
  return stat;
519
518
}