summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 2036ceb..ac882c3 100644
--- a/cgit.c
+++ b/cgit.c
@@ -359,28 +359,28 @@ int main(int argc, const char **argv)
359 int err, ttl; 359 int err, ttl;
360 360
361 prepare_context(&ctx); 361 prepare_context(&ctx);
362 cgit_repolist.length = 0; 362 cgit_repolist.length = 0;
363 cgit_repolist.count = 0; 363 cgit_repolist.count = 0;
364 cgit_repolist.repos = NULL; 364 cgit_repolist.repos = NULL;
365 365
366 parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG, 366 parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG,
367 config_cb); 367 config_cb);
368 ctx.repo = NULL; 368 ctx.repo = NULL;
369 if (getenv("SCRIPT_NAME")) 369 if (getenv("SCRIPT_NAME"))
370 ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME")); 370 ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME"));
371 if (getenv("QUERY_STRING")) 371 if (getenv("QUERY_STRING"))
372 ctx.qry.raw = xstrdup(getenv("QUERY_STRING")); 372 ctx.qry.raw = xstrdup(getenv("QUERY_STRING"));
373 cgit_parse_args(argc, argv); 373 cgit_parse_args(argc, argv);
374 http_parse_querystring(ctx.qry.raw, querystring_cb); 374 http_parse_querystring(ctx.qry.raw, querystring_cb);
375 375
376 ttl = calc_ttl(); 376 ttl = calc_ttl();
377 ctx.page.expires += ttl*60; 377 ctx.page.expires += ttl*60;
378 if (ctx.cfg.nocache) 378 if (ctx.cfg.nocache)
379 ctx.cfg.cache_size = 0; 379 ctx.cfg.cache_size = 0;
380 err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root, 380 err = cache_process(ctx.cfg.cache_size, ctx.cfg.cache_root,
381 ctx.qry.raw, ttl, process_request, &ctx); 381 ctx.qry.raw, ttl, process_request, &ctx);
382 if (err) 382 if (err)
383 cache_log("[cgit] error %d - %s\n", 383 cgit_print_error(fmt("Error processing page: %s (%d)",
384 err, strerror(err)); 384 strerror(err), err));
385 return err; 385 return err;
386} 386}