| Add better error description in case a file could not be opened. - geomyidae - … | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 9a2203506973a803e74ffa80a27f2bf1919b68cc | |
| parent 7b14b6e74778cf0ddb328cf3e049a302be614b36 | |
| Author: Christoph Lohmann <[email protected]> | |
| Date: Wed, 4 Jan 2017 22:09:39 +0100 | |
| Add better error description in case a file could not be opened. | |
| Diffstat: | |
| M main.c | 5 +++++ | |
| 1 file changed, 5 insertions(+), 0 deletions(-) | |
| --- | |
| diff --git a/main.c b/main.c | |
| @@ -188,6 +188,11 @@ handlerequest(int sock, char *base, char *ohost, char *por… | |
| } | |
| } else { | |
| fd = open(path, O_RDONLY); | |
| + if(fd < 0) { | |
| + if(loglvl & ERRORS) | |
| + logentry(clienth, clientp, recvc, strerror(err… | |
| + return; | |
| + } | |
| } | |
| if(fd >= 0) { |