X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fdsi%2Fdsi_stream.c;h=d301267d330c8805c6852ebbf8ebb5f3d31bdb20;hb=8301e2125ce4956ff546ec6cb6af7271f5412ff1;hp=ab1339184b48b1394a89415c481f2689ad0d83c9;hpb=a49b66d98f3de80884b15f68285f4b602db19885;p=netatalk.git diff --git a/libatalk/dsi/dsi_stream.c b/libatalk/dsi/dsi_stream.c index ab133918..d301267d 100644 --- a/libatalk/dsi/dsi_stream.c +++ b/libatalk/dsi/dsi_stream.c @@ -338,13 +338,16 @@ ssize_t dsi_stream_read_file(DSI *dsi, int fromfd, off_t offset, const size_t le len = sys_sendfile(dsi->socket, fromfd, &pos, length - written); if (len < 0) { - if (errno == EINTR) - continue; if (errno == EINVAL || errno == ENOSYS) { ret = -1; goto exit; } - if (errno == EAGAIN || errno == EWOULDBLOCK) { + if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { + /* + * May return EINTR too, see: + * http://wesunsolve.net/bugid/id/6408517 + * https://issues.apache.org/bugzilla/show_bug.cgi?id=44550 + */ #if defined(SOLARIS) || defined(FREEBSD) if (pos > offset) { /* we actually have sent sth., adjust counters and keep trying */