diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-19 06:59:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-19 06:59:44 +0000 |
commit | 72870fa8d3cfdf42da129f5046f598cd90321548 (patch) | |
tree | 85bbd8a22b4629c317bf11fbac22709e1dfbaf04 /lib/libc | |
parent | f1edd315e0480f10dca5b8d79dca45c93f1dc901 (diff) |
incorrect timeout handling
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/rpc/clnt_tcp.c | 4 | ||||
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c index b3efd3123f1..929f49713cf 100644 --- a/lib/libc/rpc/clnt_tcp.c +++ b/lib/libc/rpc/clnt_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.15 1997/09/22 05:11:06 millert Exp $"; +static char *rcsid = "$OpenBSD: clnt_tcp.c,v 1.16 1998/05/19 06:58:51 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -429,7 +429,7 @@ readtcp(ct, buf, len) gettimeofday(&after, NULL); timersub(&start, &after, &duration); - timersub(&delta, &duration, &tmp); + timersub(&ct->ct_wait, &duration, &tmp); delta = tmp; if (delta.tv_sec < 0 || !timerisset(&delta)) r = 0; diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index bd29078b461..c2a220843d9 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.15 1997/07/09 03:05:05 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.16 1998/05/19 06:59:43 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -365,7 +365,7 @@ readtcp(xprt, buf, len) goto fatal_err; gettimeofday(&tmp1, NULL); timersub(&tmp1, &start, &tmp2); - timersub(&delta, &tmp2, &tmp1); + timersub(&wait_per_try, &tmp2, &tmp1); if (tmp1.tv_sec < 0 || !timerisset(&tmp1)) goto fatal_err; delta = tmp1; |