http streaming: DVR file - fix wrong lseek check

This commit is contained in:
Jaroslav Kysela 2014-11-10 19:53:41 +01:00
parent 307354abd6
commit c3c767549b

View 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;
}