]> granicus.if.org Git - neomutt/commit
Fix raw socket read/write to follow expected behavior
authorKevin McCarthy <kevin@8t8.us>
Mon, 21 Jan 2019 23:19:08 +0000 (15:19 -0800)
committerRichard Russon <rich@flatcap.org>
Tue, 9 Apr 2019 11:54:27 +0000 (12:54 +0100)
commitca2f25a6ae6c566b48f680f39feb4eac6f1657f9
treed0ef9941f276596ac480ff27533a7e4b9273ed67
parenta9dbaaee1c640d6ce1734d8e6ed7adb4d5316fd4
Fix raw socket read/write to follow expected behavior

The mutt_sasl.c code expects conn_write() to write the entire buffer.
This is inconsistent with mutt_socket.c, but since other conn_write()
implementations guarantee this, change raw_socket_write() to do so too
for now.

Also, update reading and writing to loop on EINTR, as gnutls does.
They won't return EAGAIN or EWOULDBLOCK because we don't mark sockets
as non-blocking.

Co-authored-by: Richard Russon <rich@flatcap.org>
conn/conn_raw.c