1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Obsolete RPC implementation in libc.

This commit is contained in:
Ulrich Drepper
2011-04-16 21:59:36 -04:00
parent e6c6149412
commit 7b57bfe598
71 changed files with 991 additions and 621 deletions

View File

@ -188,9 +188,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
/*
* pre-serialize the static part of the call msg and stash it away
*/
INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
XDR_ENCODE);
if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg))
xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE);
if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg))
{
if (ct->ct_closeit)
{
@ -205,11 +204,11 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
* Create a client handle which uses xdrrec for serialization
* and authnone for authentication.
*/
INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz,
(caddr_t) ct, readtcp, writetcp);
xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,
(caddr_t) ct, readtcp, writetcp);
h->cl_ops = (struct clnt_ops *) &tcp_ops;
h->cl_private = (caddr_t) ct;
h->cl_auth = INTUSE(authnone_create) ();
h->cl_auth = authnone_create ();
return h;
fooy:
@ -220,7 +219,11 @@ fooy:
mem_free ((caddr_t) h, sizeof (CLIENT));
return ((CLIENT *) NULL);
}
INTDEF (clnttcp_create)
#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (clnttcp_create)
#else
libc_hidden_nolink (clnttcp_create, GLIBC_2_0)
#endif
static enum clnt_stat
clnttcp_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
@ -260,10 +263,10 @@ call_again:
{
if (ct->ct_error.re_status == RPC_SUCCESS)
ct->ct_error.re_status = RPC_CANTENCODEARGS;
(void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
(void) xdrrec_endofrecord (xdrs, TRUE);
return (ct->ct_error.re_status);
}
if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow))
if (!xdrrec_endofrecord (xdrs, shipnow))
return ct->ct_error.re_status = RPC_CANTSEND;
if (!shipnow)
return RPC_SUCCESS;
@ -284,11 +287,11 @@ call_again:
{
reply_msg.acpted_rply.ar_verf = _null_auth;
reply_msg.acpted_rply.ar_results.where = NULL;
reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void);
if (!INTUSE(xdrrec_skiprecord) (xdrs))
reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
if (!xdrrec_skiprecord (xdrs))
return (ct->ct_error.re_status);
/* now decode and validate the response header */
if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg))
if (!xdr_replymsg (xdrs, &reply_msg))
{
if (ct->ct_error.re_status == RPC_SUCCESS)
continue;
@ -318,8 +321,7 @@ call_again:
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
{
xdrs->x_op = XDR_FREE;
(void) INTUSE(xdr_opaque_auth) (xdrs,
&(reply_msg.acpted_rply.ar_verf));
(void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf));
}
} /* end successful completion */
else