From a885b1bb163feff69b285a67e580cb7d48223c66 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 8 Oct 1995 18:29:25 +0000 Subject: [PATCH] (recv_token): When continuning a partial read over the network, put the incomming data into the middle of the token - not back at the start. Now, can someone explain why under NetBSD, in one direction 400+ bytes could be sent at one time, but in the reverse, 102 had to be broken down into 100 + 2? Anyways, this fixes the NetBSD problem with the tests. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6948 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gss-sample/ChangeLog | 5 +++++ src/appl/gss-sample/gss-misc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index ad0b68425..ecbd213b9 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 8 14:26:25 1995 Ezra Peisach + + * gss-misc.c (recv_token): When looping for partial read from + network, start reading in the middle of the token. + Wed Sep 27 18:36:06 1995 Theodore Y. Ts'o * gss-client.c (main): Set display_file to be stdout. diff --git a/src/appl/gss-sample/gss-misc.c b/src/appl/gss-sample/gss-misc.c index 8abf90f7b..82110d79c 100644 --- a/src/appl/gss-sample/gss-misc.c +++ b/src/appl/gss-sample/gss-misc.c @@ -143,7 +143,7 @@ int recv_token(s, tok) } while (readsofar < tok->length) { - ret = read(s, (char *) tok->value, tok->length); + ret = read(s, (char *) tok->value + readsofar, tok->length); readsofar += ret; if (ret < 0) { perror("reading token data"); -- 2.26.2