use the right return-value for an error

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1339 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.12
Jan Kneschke 16 years ago
parent 634ec365f5
commit 15a488a945
  1. 4
      src/mod_webdav.c

@ -1704,14 +1704,14 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
-1 == (c->file.fd = open(c->file.name->ptr, O_RDONLY))) {
log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno));
return -1;
return HANDLER_ERROR;
}
if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
strerror(errno), c->file.name, c->file.fd);
return -1;
return HANDLER_ERROR;
}
c->file.mmap.length = c->file.length;

Loading…
Cancel
Save