From 5fbe9d10da676a17bf8716d1300ac670d204353f Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Wed, 24 Nov 2010 01:01:27 +0000 Subject: [PATCH] * Fall back to regular I/O instead of using sendfile() if we get EINVAL. --- upnphttp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upnphttp.c b/upnphttp.c index ec1ac34..4c81f90 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -1132,7 +1132,7 @@ send_file(struct upnphttp * h, int sendfd, off_t offset, off_t end_offset) { DPRINTF(E_DEBUG, L_HTTP, "sendfile error :: error no. %d [%s]\n", errno, strerror(errno)); /* If sendfile isn't supported on the filesystem, don't bother trying to use it again. */ - if( errno == EOVERFLOW ) + if( errno == EOVERFLOW || errno == EINVAL ) try_sendfile = 0; else if( errno != EAGAIN ) break;