mirror of
https://git.zx2c4.com/cgit
synced 2025-07-21 11:24:22 +02:00
cache.c: do not ignore errors from print_slot()
If print_slot() fails, the client will be served an inferior response. This patch makes sure that such an error will be returned to main(), which in turn will try to inform about the error in the response itself. The error is also printed to the cache_log, i.e. stderr, which will make the error message appear in error_log (atleast when httpd==apache). Noticed-by: Jim Meyering <jim@meyering.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
cdc6b2f8e7
commit
af2e75616d
2 changed files with 15 additions and 5 deletions
4
cgit.c
4
cgit.c
|
@ -380,7 +380,7 @@ int main(int argc, const char **argv)
|
|||
err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root,
|
||||
ctx.qry.raw, ttl, process_request, &ctx);
|
||||
if (err)
|
||||
cache_log("[cgit] error %d - %s\n",
|
||||
err, strerror(err));
|
||||
cgit_print_error(fmt("Error processing page: %s (%d)",
|
||||
strerror(err), err));
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue