summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-04-03 17:15:23 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2014-04-03 17:15:23 +0000
commit69e4f6ef518a68bb77927c05ee06dcbaf8b7fc15 (patch)
tree7d0ffd80d5748f787cdc99c663aa26cde743b360
parent7847b3fddb1f3e857f3fe317a1962ab29395c935 (diff)
parent5131caa123fd046a511d18145869507ae9b7b9dd (diff)
downloadillumos-joyent-20140403.tar.gz
[illumos-gate merge]20140403release-20140403
commit 5131caa123fd046a511d18145869507ae9b7b9dd 4462 clnt_vc_control()/clnt_dg_control() could return RPC_FAILED instead of FALSE
-rw-r--r--usr/src/lib/libnsl/rpc/clnt_dg.c94
-rw-r--r--usr/src/lib/libnsl/rpc/clnt_vc.c94
2 files changed, 96 insertions, 92 deletions
diff --git a/usr/src/lib/libnsl/rpc/clnt_dg.c b/usr/src/lib/libnsl/rpc/clnt_dg.c
index ed7c6d02de..ad1ec2007b 100644
--- a/usr/src/lib/libnsl/rpc/clnt_dg.c
+++ b/usr/src/lib/libnsl/rpc/clnt_dg.c
@@ -24,6 +24,10 @@
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ */
+
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
@@ -32,8 +36,6 @@
* California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Implements a connectionless client side RPC.
*/
@@ -163,7 +165,7 @@ clnt_dg_create(const int fd, struct netbuf *svcaddr, const rpcprog_t program,
*/
if (tinfo.servtype == T_CLTS)
(void) __rpc_tli_set_options(fd, SOL_SOCKET, SO_DGRAM_ERRIND,
- 1);
+ 1);
/*
* Find the receive and the send size
*/
@@ -211,11 +213,9 @@ clnt_dg_create(const int fd, struct netbuf *svcaddr, const rpcprog_t program,
}
cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs));
XDR_DESTROY(&(cu->cu_outxdrs));
- xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf_start, ssz,
- XDR_ENCODE);
+ xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf_start, ssz, XDR_ENCODE);
/* LINTED pointer alignment */
- tr_data = (struct t_unitdata *)t_alloc(fd,
- T_UNITDATA, T_ADDR | T_OPT);
+ tr_data = (struct t_unitdata *)t_alloc(fd, T_UNITDATA, T_ADDR | T_OPT);
if (tr_data == NULL) {
goto err1;
}
@@ -309,9 +309,9 @@ call_again:
if (cl->cl_auth->ah_cred.oa_flavor != RPCSEC_GSS) {
if ((!XDR_PUTBYTES(xdrs, cu->cu_outbuf, cu->cu_xdrpos)) ||
- (!XDR_PUTINT32(xdrs, (int32_t *)&proc)) ||
- (!AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
- (!xargs(xdrs, argsp))) {
+ (!XDR_PUTINT32(xdrs, (int32_t *)&proc)) ||
+ (!AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
+ (!xargs(xdrs, argsp))) {
rpc_fd_unlock(dgtbl, cu->cu_fd);
return (rpc_callerr.re_status = RPC_CANTENCODEARGS);
}
@@ -367,7 +367,7 @@ send_again:
}
if (poll_time.tv_sec < 0 || (poll_time.tv_sec == 0 &&
- poll_time.tv_usec == 0)) {
+ poll_time.tv_usec == 0)) {
/*
* this could happen if time_waited >= timeout
*/
@@ -376,8 +376,8 @@ send_again:
}
if (poll_time.tv_sec > retransmit_time.tv_sec ||
- (poll_time.tv_sec == retransmit_time.tv_sec &&
- poll_time.tv_usec > retransmit_time.tv_usec))
+ (poll_time.tv_sec == retransmit_time.tv_sec &&
+ poll_time.tv_usec > retransmit_time.tv_usec))
poll_time = retransmit_time;
@@ -386,7 +386,7 @@ send_again:
(void) gettimeofday(&startime, NULL);
switch (poll(&cu->pfdp, 1,
- __rpc_timeval_to_msec(&poll_time))) {
+ __rpc_timeval_to_msec(&poll_time))) {
case -1:
if (errno != EINTR && errno != EAGAIN) {
rpc_callerr.re_errno = errno;
@@ -403,7 +403,7 @@ send_again:
timeout: (void) gettimeofday(&curtime, NULL);
time_waited.tv_sec += curtime.tv_sec - startime.tv_sec;
time_waited.tv_usec += curtime.tv_usec -
- startime.tv_usec;
+ startime.tv_usec;
while (time_waited.tv_usec >= 1000000) {
time_waited.tv_usec -= 1000000;
time_waited.tv_sec++;
@@ -431,8 +431,7 @@ timeout: (void) gettimeofday(&curtime, NULL);
* if there's time left to poll, poll again
*/
if (poll_time.tv_sec > 0 ||
- (poll_time.tv_sec == 0 &&
- poll_time.tv_usec > 0))
+ (poll_time.tv_sec == 0 && poll_time.tv_usec > 0))
continue;
/*
@@ -440,8 +439,8 @@ timeout: (void) gettimeofday(&curtime, NULL);
* otherwise, return timeout error
*/
if (time_waited.tv_sec < timeout.tv_sec ||
- (time_waited.tv_sec == timeout.tv_sec &&
- time_waited.tv_usec < timeout.tv_usec)) {
+ (time_waited.tv_sec == timeout.tv_sec &&
+ time_waited.tv_usec < timeout.tv_usec)) {
/*
* update retransmit_time
*/
@@ -453,16 +452,16 @@ timeout: (void) gettimeofday(&curtime, NULL);
}
if (retransmit_time.tv_sec >= RPC_MAX_BACKOFF) {
retransmit_time.tv_sec =
- RPC_MAX_BACKOFF;
+ RPC_MAX_BACKOFF;
retransmit_time.tv_usec = 0;
}
/*
* redo AUTH_MARSHAL if AUTH_DES or RPCSEC_GSS.
*/
if (cl->cl_auth->ah_cred.oa_flavor ==
- AUTH_DES ||
- cl->cl_auth->ah_cred.oa_flavor ==
- RPCSEC_GSS)
+ AUTH_DES ||
+ cl->cl_auth->ah_cred.oa_flavor ==
+ RPCSEC_GSS)
goto call_again;
else
goto send_again;
@@ -537,8 +536,8 @@ timeout: (void) gettimeofday(&curtime, NULL);
/* see if reply transaction id matches sent id */
/* LINTED pointer alignment */
if (*((uint32_t *)(cu->cu_inbuf)) !=
- /* LINTED pointer alignment */
- *((uint32_t *)(cu->cu_outbuf)))
+ /* LINTED pointer alignment */
+ *((uint32_t *)(cu->cu_outbuf)))
goto timeout;
/* we now assume we have the proper reply */
break;
@@ -549,32 +548,34 @@ timeout: (void) gettimeofday(&curtime, NULL);
*/
xdrmem_create(&reply_xdrs, cu->cu_inbuf,
- (uint_t)cu->cu_tr_data->udata.len, XDR_DECODE);
+ (uint_t)cu->cu_tr_data->udata.len, XDR_DECODE);
ok = xdr_replymsg(&reply_xdrs, &reply_msg);
/* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */
if (ok) {
if ((reply_msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
- (reply_msg.acpted_rply.ar_stat == SUCCESS))
+ (reply_msg.acpted_rply.ar_stat == SUCCESS))
rpc_callerr.re_status = RPC_SUCCESS;
else
__seterr_reply(&reply_msg, &(rpc_callerr));
if (rpc_callerr.re_status == RPC_SUCCESS) {
if (!AUTH_VALIDATE(cl->cl_auth,
- &reply_msg.acpted_rply.ar_verf)) {
+ &reply_msg.acpted_rply.ar_verf)) {
rpc_callerr.re_status = RPC_AUTHERROR;
rpc_callerr.re_why = AUTH_INVALIDRESP;
} else if (cl->cl_auth->ah_cred.oa_flavor !=
- RPCSEC_GSS) {
+ RPCSEC_GSS) {
if (!(*xresults)(&reply_xdrs, resultsp)) {
- if (rpc_callerr.re_status == RPC_SUCCESS)
- rpc_callerr.re_status =
- RPC_CANTDECODERES;
+ if (rpc_callerr.re_status ==
+ RPC_SUCCESS)
+ rpc_callerr.re_status =
+ RPC_CANTDECODERES;
}
} else if (!__rpc_gss_unwrap(cl->cl_auth, &reply_xdrs,
- xresults, resultsp)) {
+ xresults, resultsp)) {
if (rpc_callerr.re_status == RPC_SUCCESS)
- rpc_callerr.re_status = RPC_CANTDECODERES;
+ rpc_callerr.re_status =
+ RPC_CANTDECODERES;
}
} /* end successful completion */
/*
@@ -599,10 +600,10 @@ timeout: (void) gettimeofday(&curtime, NULL);
/* end of unsuccessful completion */
/* free verifier */
if (reply_msg.rm_reply.rp_stat == MSG_ACCEPTED &&
- reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
+ reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
xdrs->x_op = XDR_FREE;
(void) xdr_opaque_auth(xdrs,
- &(reply_msg.acpted_rply.ar_verf));
+ &(reply_msg.acpted_rply.ar_verf));
}
} /* end of valid reply message */
else {
@@ -646,9 +647,9 @@ clnt_dg_send(CLIENT *cl, rpcproc_t proc, xdrproc_t xargs, caddr_t argsp)
if (cl->cl_auth->ah_cred.oa_flavor != RPCSEC_GSS) {
if ((!XDR_PUTBYTES(xdrs, cu->cu_outbuf, cu->cu_xdrpos)) ||
- (!XDR_PUTINT32(xdrs, (int32_t *)&proc)) ||
- (!AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
- (!xargs(xdrs, argsp))) {
+ (!XDR_PUTINT32(xdrs, (int32_t *)&proc)) ||
+ (!AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
+ (!xargs(xdrs, argsp))) {
rpc_fd_unlock(dgtbl, cu->cu_fd);
return (rpc_callerr.re_status = RPC_CANTENCODEARGS);
}
@@ -716,7 +717,7 @@ clnt_dg_control(CLIENT *cl, int request, char *info)
struct netbuf *addr;
if (rpc_fd_lock(dgtbl, cu->cu_fd)) {
rpc_fd_unlock(dgtbl, cu->cu_fd);
- return (RPC_FAILED);
+ return (FALSE);
}
switch (request) {
@@ -814,14 +815,14 @@ clnt_dg_control(CLIENT *cl, int request, char *info)
*/
/* LINTED pointer alignment */
*(uint32_t *)info = ntohl(*(uint32_t *)(cu->cu_outbuf +
- 4 * BYTES_PER_XDR_UNIT));
+ 4 * BYTES_PER_XDR_UNIT));
break;
case CLSET_VERS:
/* LINTED pointer alignment */
*(uint32_t *)(cu->cu_outbuf + 4 * BYTES_PER_XDR_UNIT) =
/* LINTED pointer alignment */
- htonl(*(uint32_t *)info);
+ htonl(*(uint32_t *)info);
break;
case CLGET_PROG:
@@ -833,14 +834,14 @@ clnt_dg_control(CLIENT *cl, int request, char *info)
*/
/* LINTED pointer alignment */
*(uint32_t *)info = ntohl(*(uint32_t *)(cu->cu_outbuf +
- 3 * BYTES_PER_XDR_UNIT));
+ 3 * BYTES_PER_XDR_UNIT));
break;
case CLSET_PROG:
/* LINTED pointer alignment */
*(uint32_t *)(cu->cu_outbuf + 3 * BYTES_PER_XDR_UNIT) =
/* LINTED pointer alignment */
- htonl(*(uint32_t *)info);
+ htonl(*(uint32_t *)info);
break;
default:
@@ -903,7 +904,7 @@ static bool_t
time_not_ok(struct timeval *t)
{
return (t->tv_sec < -1 || t->tv_sec > 100000000 ||
- t->tv_usec < -1 || t->tv_usec > 1000000);
+ t->tv_usec < -1 || t->tv_usec > 1000000);
}
/*
@@ -920,8 +921,7 @@ _rcv_unitdata_err(struct cu_data *cu)
old = t_errno;
/* LINTED pointer cast */
- uderr = (struct t_uderr *)
- t_alloc(cu->cu_fd, T_UDERROR, T_ADDR);
+ uderr = (struct t_uderr *)t_alloc(cu->cu_fd, T_UDERROR, T_ADDR);
if (t_rcvuderr(cu->cu_fd, uderr) == 0) {
if (uderr == NULL)
diff --git a/usr/src/lib/libnsl/rpc/clnt_vc.c b/usr/src/lib/libnsl/rpc/clnt_vc.c
index a6006ad593..671adaada6 100644
--- a/usr/src/lib/libnsl/rpc/clnt_vc.c
+++ b/usr/src/lib/libnsl/rpc/clnt_vc.c
@@ -23,6 +23,9 @@
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ */
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -32,8 +35,6 @@
* California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* clnt_vc.c
*
@@ -213,7 +214,7 @@ clnt_vc_create(const int fd, struct netbuf *svcaddr, const rpcprog_t prog,
const rpcvers_t vers, const uint_t sendsz, const uint_t recvsz)
{
return (_clnt_vc_create_timed(fd, svcaddr, prog, vers, sendsz,
- recvsz, NULL));
+ recvsz, NULL));
}
/*
@@ -242,7 +243,7 @@ _clnt_vc_create_timed(int fd, struct netbuf *svcaddr, rpcprog_t prog,
ct = malloc(sizeof (*ct));
if ((cl == NULL) || (ct == NULL)) {
(void) syslog(LOG_ERR, clnt_vc_errstr,
- clnt_vc_str, __no_mem_str);
+ clnt_vc_str, __no_mem_str);
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
rpc_createerr.cf_error.re_terrno = 0;
@@ -350,7 +351,7 @@ _clnt_vc_create_timed(int fd, struct netbuf *svcaddr, rpcprog_t prog,
*/
ct->ct_xdrs.x_ops = NULL;
xdrrec_create(&(ct->ct_xdrs), sendsz, recvsz, (caddr_t)ct,
- read_vc, write_vc);
+ read_vc, write_vc);
if (ct->ct_xdrs.x_ops == NULL) {
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_terrno = 0;
@@ -508,18 +509,22 @@ set_up_connection(int fd, struct netbuf *svcaddr, struct ct_data *ct,
* for other reason, default timeout will be used.
*/
if (tp != NULL) {
- int ms;
+ int ms;
- /* TCP_CONN_ABORT_THRESHOLD takes int value in millisecs */
- ms = tp->tv_sec * SECS_TO_MS + tp->tv_usec * USECS_TO_MS;
- if (((curr_time = _get_tcp_conntime(fd)) != -1) &&
- (_set_tcp_conntime(fd, ms) == 0)) {
- /* EMPTY */
+ /*
+ * TCP_CONN_ABORT_THRESHOLD takes int value in millisecs
+ */
+ ms = tp->tv_sec * SECS_TO_MS +
+ tp->tv_usec * USECS_TO_MS;
+ if (((curr_time = _get_tcp_conntime(fd)) != -1) &&
+ (_set_tcp_conntime(fd, ms) == 0)) {
+ /* EMPTY */
#ifdef DEBUG
- fprintf(stderr, "set_up_connection: set tcp ");
- fprintf(stderr, "connection timeout to %d ms\n", ms);
+ fprintf(stderr, "set_up_connection: set tcp ");
+ fprintf(stderr, "connection timeout to %d ms\n",
+ ms);
#endif
- }
+ }
}
for (nconnect = 0; nconnect < 3; nconnect++) {
@@ -570,7 +575,7 @@ set_up_connection(int fd, struct netbuf *svcaddr, struct ct_data *ct,
(void) t_free((char *)rcvcall, T_CALL);
#ifdef DEBUG
fprintf(stderr, "clnt_vc: t_connect error %d\n",
- rpc_createerr.cf_error.re_terrno);
+ rpc_createerr.cf_error.re_terrno);
#endif
return (FALSE);
}
@@ -595,14 +600,14 @@ set_up_connection(int fd, struct netbuf *svcaddr, struct ct_data *ct,
ct->ct_addr.buf = malloc(svcaddr->len);
if (ct->ct_addr.buf == NULL) {
(void) syslog(LOG_ERR, clnt_vc_errstr,
- clnt_vc_str, __no_mem_str);
+ clnt_vc_str, __no_mem_str);
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
rpc_createerr.cf_error.re_terrno = 0;
return (FALSE);
}
(void) memcpy(ct->ct_addr.buf, svcaddr->buf,
- (size_t)svcaddr->len);
+ (size_t)svcaddr->len);
ct->ct_addr.len = ct->ct_addr.maxlen = svcaddr->len;
}
break;
@@ -738,16 +743,17 @@ call_again:
if (rpc_callerr.re_status == RPC_SUCCESS) {
if (!AUTH_VALIDATE(cl->cl_auth,
- &reply_msg.acpted_rply.ar_verf)) {
+ &reply_msg.acpted_rply.ar_verf)) {
rpc_callerr.re_status = RPC_AUTHERROR;
rpc_callerr.re_why = AUTH_INVALIDRESP;
} else if (cl->cl_auth->ah_cred.oa_flavor != RPCSEC_GSS) {
if (!(*xdr_results)(xdrs, results_ptr)) {
if (rpc_callerr.re_status == RPC_SUCCESS)
- rpc_callerr.re_status = RPC_CANTDECODERES;
+ rpc_callerr.re_status =
+ RPC_CANTDECODERES;
}
} else if (!__rpc_gss_unwrap(cl->cl_auth, xdrs, xdr_results,
- results_ptr)) {
+ results_ptr)) {
if (rpc_callerr.re_status == RPC_SUCCESS)
rpc_callerr.re_status = RPC_CANTDECODERES;
}
@@ -771,7 +777,7 @@ call_again:
} /* end of unsuccessful completion */
/* free verifier ... */
if (reply_msg.rm_reply.rp_stat == MSG_ACCEPTED &&
- reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
+ reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
xdrs->x_op = XDR_FREE;
(void) xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
}
@@ -881,7 +887,7 @@ clnt_vc_control(CLIENT *cl, int request, char *info)
if (rpc_fd_lock(vctbl, ct->ct_fd)) {
rpc_fd_unlock(vctbl, ct->ct_fd);
- return (RPC_FAILED);
+ return (FALSE);
}
switch (request) {
@@ -927,8 +933,7 @@ clnt_vc_control(CLIENT *cl, int request, char *info)
/* LINTED pointer alignment */
((struct timeval *)info)->tv_sec = ct->ct_wait / 1000;
/* LINTED pointer alignment */
- ((struct timeval *)info)->tv_usec =
- (ct->ct_wait % 1000) * 1000;
+ ((struct timeval *)info)->tv_usec = (ct->ct_wait % 1000) * 1000;
break;
case CLGET_SERVER_ADDR: /* For compatibility only */
(void) memcpy(info, ct->ct_addr.buf, (size_t)ct->ct_addr.len);
@@ -957,7 +962,7 @@ clnt_vc_control(CLIENT *cl, int request, char *info)
return (FALSE);
}
ret = set_up_connection(ct->ct_fd, (struct netbuf *)info,
- ct, NULL));
+ ct, NULL);
rpc_fd_unlock(vctbl, ct->ct_fd);
return (ret);
#else
@@ -988,14 +993,14 @@ clnt_vc_control(CLIENT *cl, int request, char *info)
*/
/* LINTED pointer alignment */
*(uint32_t *)info = ntohl(*(uint32_t *)(ct->ct_mcall +
- 4 * BYTES_PER_XDR_UNIT));
+ 4 * BYTES_PER_XDR_UNIT));
break;
case CLSET_VERS:
/* LINTED pointer alignment */
*(uint32_t *)(ct->ct_mcall + 4 * BYTES_PER_XDR_UNIT) =
/* LINTED pointer alignment */
- htonl(*(uint32_t *)info);
+ htonl(*(uint32_t *)info);
break;
case CLGET_PROG:
@@ -1007,29 +1012,29 @@ clnt_vc_control(CLIENT *cl, int request, char *info)
*/
/* LINTED pointer alignment */
*(uint32_t *)info = ntohl(*(uint32_t *)(ct->ct_mcall +
- 3 * BYTES_PER_XDR_UNIT));
+ 3 * BYTES_PER_XDR_UNIT));
break;
case CLSET_PROG:
/* LINTED pointer alignment */
*(uint32_t *)(ct->ct_mcall + 3 * BYTES_PER_XDR_UNIT) =
/* LINTED pointer alignment */
- htonl(*(uint32_t *)info);
+ htonl(*(uint32_t *)info);
break;
case CLSET_IO_MODE:
/* LINTED pointer cast */
if (!set_io_mode(ct, *(int *)info)) {
- rpc_fd_unlock(vctbl, ct->ct_fd);
- return (FALSE);
+ rpc_fd_unlock(vctbl, ct->ct_fd);
+ return (FALSE);
}
break;
case CLSET_FLUSH_MODE:
/* Set a specific FLUSH_MODE */
/* LINTED pointer cast */
if (!set_flush_mode(ct, *(int *)info)) {
- rpc_fd_unlock(vctbl, ct->ct_fd);
- return (FALSE);
+ rpc_fd_unlock(vctbl, ct->ct_fd);
+ return (FALSE);
}
break;
case CLGET_FLUSH_MODE:
@@ -1148,7 +1153,7 @@ read_vc(void *ct_tmp, caddr_t buf, int len)
pfdp = thr_get_storage(&pfdp_key, sizeof (struct pollfd), free);
if (pfdp == NULL) {
(void) syslog(LOG_ERR, clnt_vc_errstr,
- clnt_read_vc_str, __no_mem_str);
+ clnt_read_vc_str, __no_mem_str);
rpc_callerr.re_status = RPC_SYSTEMERROR;
rpc_callerr.re_errno = errno;
rpc_callerr.re_terrno = 0;
@@ -1183,12 +1188,12 @@ read_vc(void *ct_tmp, caddr_t buf, int len)
/* reallocate pfdp to svc_max_pollfd +1 */
if (npfd != (svc_max_pollfd + 1)) {
struct pollfd *tmp_pfdp = realloc(pfdp,
- sizeof (struct pollfd) *
- (svc_max_pollfd + 1));
+ sizeof (struct pollfd) *
+ (svc_max_pollfd + 1));
if (tmp_pfdp == NULL) {
sig_rw_unlock(&svc_fd_lock);
(void) syslog(LOG_ERR, clnt_vc_errstr,
- clnt_read_vc_str, __no_mem_str);
+ clnt_read_vc_str, __no_mem_str);
rpc_callerr.re_status = RPC_SYSTEMERROR;
rpc_callerr.re_errno = errno;
rpc_callerr.re_terrno = 0;
@@ -1229,13 +1234,12 @@ read_vc(void *ct_tmp, caddr_t buf, int len)
continue;
};
delta = (curtime.tv_sec -
- starttime.tv_sec) * 1000 +
- (curtime.tv_usec -
- starttime.tv_usec) / 1000;
+ starttime.tv_sec) * 1000 +
+ (curtime.tv_usec -
+ starttime.tv_usec) / 1000;
poll_time -= delta;
if (poll_time < 0) {
- rpc_callerr.re_status =
- RPC_TIMEDOUT;
+ rpc_callerr.re_status = RPC_TIMEDOUT;
errno = 0;
return (-1);
} else {
@@ -1349,7 +1353,7 @@ write_vc(void *ct_tmp, caddr_t buf, int len)
for (cnt = len, i = 0; cnt > 0; cnt -= i, buf += i) {
flag = cnt > maxsz ? T_MORE : 0;
if ((i = t_snd(ct->ct_fd, buf, (unsigned)MIN(cnt, maxsz),
- flag)) == -1) {
+ flag)) == -1) {
rpc_callerr.re_terrno = t_errno;
rpc_callerr.re_errno = 0;
rpc_callerr.re_status = RPC_CANTSEND;
@@ -1428,7 +1432,7 @@ static bool_t
time_not_ok(struct timeval *t)
{
return (t->tv_sec <= -1 || t->tv_sec > 100000000 ||
- t->tv_usec <= -1 || t->tv_usec > 1000000);
+ t->tv_usec <= -1 || t->tv_usec > 1000000);
}
@@ -1743,7 +1747,7 @@ nb_send(struct ct_data *ct, void *buff, unsigned int nBytes)
/* And add the remaining part of the message. */
if (len != nBytes) {
if (addInBuffer(ct, (char *)buff + len,
- nBytes-len) == -1) {
+ nBytes-len) == -1) {
return (-1);
}
}