clnt_call takes args of type xdrproc_t.
This commit is contained in:
parent
017ea7dbc2
commit
4f75936922
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121529
@ -52,8 +52,8 @@ rusers(host, up)
|
||||
struct utmpidlearr *up;
|
||||
{
|
||||
return (callrpc(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES,
|
||||
xdr_void, (char *) NULL,
|
||||
xdr_utmpidlearr, (char *) up));
|
||||
(xdrproc_t)xdr_void, (char *) NULL,
|
||||
(xdrproc_t)xdr_utmpidlearr, (char *) up));
|
||||
}
|
||||
|
||||
int
|
||||
@ -63,8 +63,8 @@ rnusers(host)
|
||||
int nusers;
|
||||
|
||||
if (callrpc(host, RUSERSPROG, RUSERSVERS_ORIG, RUSERSPROC_NUM,
|
||||
xdr_void, (char *) NULL,
|
||||
xdr_u_long, (char *) &nusers) != 0)
|
||||
(xdrproc_t)xdr_void, (char *) NULL,
|
||||
(xdrproc_t)xdr_u_long, (char *) &nusers) != 0)
|
||||
return (-1);
|
||||
else
|
||||
return (nusers);
|
||||
|
@ -51,8 +51,8 @@ rstat(host, statp)
|
||||
struct statstime *statp;
|
||||
{
|
||||
return (callrpc(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
|
||||
xdr_void, (char *) NULL,
|
||||
xdr_statstime, (char *) statp));
|
||||
(xdrproc_t)xdr_void, (char *) NULL,
|
||||
(xdrproc_t)xdr_statstime, (char *) statp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -62,8 +62,8 @@ havedisk(host)
|
||||
long have;
|
||||
|
||||
if (callrpc(host, RSTATPROG, RSTATVERS_SWTCH, RSTATPROC_HAVEDISK,
|
||||
xdr_void, (char *) NULL,
|
||||
xdr_long, (char *) &have) != 0)
|
||||
(xdrproc_t)xdr_void, (char *) NULL,
|
||||
(xdrproc_t)xdr_long, (char *) &have) != 0)
|
||||
return (-1);
|
||||
else
|
||||
return (have);
|
||||
|
@ -51,6 +51,6 @@ rwall(host, msg)
|
||||
char *msg;
|
||||
{
|
||||
return (callrpc(host, WALLPROG, WALLVERS, WALLPROC_WALL,
|
||||
xdr_wrapstring, (char *) &msg,
|
||||
xdr_void, (char *) NULL));
|
||||
(xdrproc_t)xdr_wrapstring, (char *) &msg,
|
||||
(xdrproc_t)xdr_void, (char *) NULL));
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ _yppasswd(char *oldpass, struct x_passwd *newpw)
|
||||
}
|
||||
|
||||
rval = callrpc(server, YPPASSWDPROG, YPPASSWDVERS, YPPASSWDPROC_UPDATE,
|
||||
xdr_yppasswd, (char *)&yppasswd, xdr_int, (char *)&result);
|
||||
(xdrproc_t)xdr_yppasswd, (char *)&yppasswd,
|
||||
(xdrproc_t)xdr_int, (char *)&result);
|
||||
|
||||
free(server);
|
||||
if (rval || result)
|
||||
|
@ -126,8 +126,9 @@ yp_update(char *domain, char *map, unsigned int ypop, char *key, int keylen,
|
||||
upargs.datum.yp_buf_len = datalen;
|
||||
upargs.datum.yp_buf_val = data;
|
||||
|
||||
if ((rval = clnt_call(clnt, YPU_CHANGE, xdr_ypupdate_args,
|
||||
&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if ((rval = clnt_call(clnt, YPU_CHANGE,
|
||||
(xdrproc_t)xdr_ypupdate_args, &upargs,
|
||||
(xdrproc_t)xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if (rval == RPC_AUTHERROR)
|
||||
res = YPERR_ACCESS;
|
||||
else
|
||||
@ -142,8 +143,9 @@ yp_update(char *domain, char *map, unsigned int ypop, char *key, int keylen,
|
||||
upargs.datum.yp_buf_len = datalen;
|
||||
upargs.datum.yp_buf_val = data;
|
||||
|
||||
if ((rval = clnt_call(clnt, YPU_INSERT, xdr_ypupdate_args,
|
||||
&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if ((rval = clnt_call(clnt, YPU_INSERT,
|
||||
(xdrproc_t)xdr_ypupdate_args, &upargs,
|
||||
(xdrproc_t)xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if (rval == RPC_AUTHERROR)
|
||||
res = YPERR_ACCESS;
|
||||
else
|
||||
@ -156,8 +158,9 @@ yp_update(char *domain, char *map, unsigned int ypop, char *key, int keylen,
|
||||
delargs.key.yp_buf_len = keylen;
|
||||
delargs.key.yp_buf_val = key;
|
||||
|
||||
if ((rval = clnt_call(clnt, YPU_DELETE, xdr_ypdelete_args,
|
||||
&delargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if ((rval = clnt_call(clnt, YPU_DELETE,
|
||||
(xdrproc_t)xdr_ypdelete_args, &delargs,
|
||||
(xdrproc_t)xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if (rval == RPC_AUTHERROR)
|
||||
res = YPERR_ACCESS;
|
||||
else
|
||||
@ -172,8 +175,9 @@ yp_update(char *domain, char *map, unsigned int ypop, char *key, int keylen,
|
||||
upargs.datum.yp_buf_len = datalen;
|
||||
upargs.datum.yp_buf_val = data;
|
||||
|
||||
if ((rval = clnt_call(clnt, YPU_STORE, xdr_ypupdate_args,
|
||||
&upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if ((rval = clnt_call(clnt, YPU_STORE,
|
||||
(xdrproc_t)xdr_ypupdate_args, &upargs,
|
||||
(xdrproc_t)xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
|
||||
if (rval == RPC_AUTHERROR)
|
||||
res = YPERR_ACCESS;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user