svn commit: samba r7025 - in branches/SAMBA_3_0/source: lib tdb
Jeremy Allison
jra at samba.org
Fri May 27 19:56:14 GMT 2005
On Fri, May 27, 2005 at 12:49:35PM -0700, Jeremy Allison wrote:
> On Fri, May 27, 2005 at 03:47:27PM -0400, derrell at samba.org wrote:
> >
> > That's pretty much what my original patch did, except that it TRIED to avoid
> > the overhead of calling read_socket_with_timeout() unless it got back EAGAIN,
> > in which case the overhead was deemed to be worthwhile.
> >
> > With my renewed insight into why I did things the way I did a few weeks ago,
> > and your insight now about these additional details, maybe we should consider
> > changing read_socket_data() to return partial packets if EAGAIN occurs after
> > partial data has been read, and go back to my original patch?
>
> No :-). As I said before, this breaks the contract for read_socket_data().
>
> Try this instead. Much simpler.
If you really want to be 100% correct about it you can change the
interface to read_socket_with_timeout() to modify the timeout value
to eat up the elapsed time before it returns. That way multiple calls
with the same &timeout variable will only sum to the total timeout.
And also it means we don't pay the time processing penalty on server
code (which is what I really care about :-).
Jeremy.
More information about the samba-technical
mailing list