Don't assume that there is readable data on the stream after the

fragment header.
This commit is contained in:
Doug Rabson 2008-03-30 09:35:04 +00:00
parent c77b232bb6
commit 7ea7cc4bab

View File

@ -574,6 +574,12 @@ __xdrrec_getrec(xdrs, statp, expectdata)
rstrm->in_header &= ~LAST_FRAG;
rstrm->last_frag = TRUE;
}
/*
* We can only reasonably expect to read once from a
* non-blocking stream. Reading the fragment header
* may have drained the stream.
*/
expectdata = FALSE;
}
n = rstrm->readit(rstrm->tcp_handle,