+Sat Jun 10 00:28:50 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * gss-misc.c (recv_token): Allow for partial reads while reading
+ the token.
+
Fri Jun 9 18:26:50 1995 <tytso@rsx-11.mit.edu>
* configure.in: Remove standardized set of autoconf macros, which
gss_buffer_t tok;
{
int ret;
+ int readsofar;
if (display_file == 0)
display_file = stderr;
return -1;
}
- ret = read(s, (char *) tok->value, tok->length);
- if (ret < 0) {
- perror("reading token data");
- free(tok->value);
- return -1;
- } else if (ret != tok->length) {
- fprintf(display_file,
- "sending token data: %d of %d bytes written\n",
- ret, tok->length);
- free(tok->value);
- return -1;
+ while (readsofar < tok->length) {
+ ret = read(s, (char *) tok->value, tok->length);
+ readsofar += ret;
+ if (ret < 0) {
+ perror("reading token data");
+ free(tok->value);
+ return -1;
+ }
}
return 0;