]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http streaming: DVR file - fix wrong lseek check
authorJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 18:53:41 +0000 (19:53 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 18:53:41 +0000 (19:53 +0100)
src/webui/webui.c

index eba5dbb6a35f813808b50afd2d61f16712ffb912..abd79b0d6aca14a5f78085edd36c7ccdeeb2f5bf 100644 (file)
@@ -1172,7 +1172,7 @@ page_dvrfile(http_connection_t *hc, const char *remain, void *opaque)
     file_start, file_end, (size_t)st.st_size);
 
   if(file_start > 0)
-    if (lseek(fd, file_start, SEEK_SET)) {
+    if (lseek(fd, file_start, SEEK_SET) != file_start) {
       close(fd);
       return HTTP_STATUS_INTERNAL;
     }