wmbiff: Remove unnecessary loop.

The last release of wmbiff included a patch by Nye Liu from Debian
bug #917467 [1].  However, the second part of that patch is not necessary.
From Andreas Metzler's comment

    I am not sure about the second part of the patch. I understand wmbiff
    breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started
    to happen recently (with TLS1.3) on blocking sockets.

    What I do not get from my rudimentary understanding C programmimg is the
    second part, this is in the else of "if (scs->tls_state)", so, afaiui for
    non-encrypted connections. Is the change necessary there at all, is it
    the right thing to retry read on EAGAIN then?

We revert the second part of the patch.

[1] https://bugs.debian.org/917467
This commit is contained in:
Torrance, Douglas 2019-03-01 10:48:49 +00:00 committed by Carlos R. Mafra
parent e807986e6e
commit 9527870311

View file

@ -242,11 +242,9 @@ tlscomm_expect(struct connection_state *scs,
} else
#endif
{
do {
thisreadbytes =
read(scs->sd, &scs->unprocessed[buffered_bytes],
BUF_SIZE - 1 - buffered_bytes);
} while (thisreadbytes == EAGAIN);
thisreadbytes =
read(scs->sd, &scs->unprocessed[buffered_bytes],
BUF_SIZE - 1 - buffered_bytes);
if (thisreadbytes < 0) {
TDM(DEBUG_ERROR, "%s: error reading: %s\n",
scs->name, strerror(errno));