|
diff --git a/cgit.c b/cgit.c index e46c00a..9305d0a 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -251,25 +251,25 @@ static void querystring_cb(const char *name, const char *value) |
251 | } else if (!strcmp(name, "ss")) { |
251 | } else if (!strcmp(name, "ss")) { |
252 | ctx.qry.ssdiff = atoi(value); |
252 | ctx.qry.ssdiff = atoi(value); |
253 | } |
253 | } |
254 | } |
254 | } |
255 | |
255 | |
256 | char *xstrdupn(const char *str) |
256 | char *xstrdupn(const char *str) |
257 | { |
257 | { |
258 | return (str ? xstrdup(str) : NULL); |
258 | return (str ? xstrdup(str) : NULL); |
259 | } |
259 | } |
260 | |
260 | |
261 | static void prepare_context(struct cgit_context *ctx) |
261 | static void prepare_context(struct cgit_context *ctx) |
262 | { |
262 | { |
263 | memset(ctx, 0, sizeof(ctx)); |
263 | memset(ctx, 0, sizeof(*ctx)); |
264 | ctx->cfg.agefile = "info/web/last-modified"; |
264 | ctx->cfg.agefile = "info/web/last-modified"; |
265 | ctx->cfg.nocache = 0; |
265 | ctx->cfg.nocache = 0; |
266 | ctx->cfg.cache_size = 0; |
266 | ctx->cfg.cache_size = 0; |
267 | ctx->cfg.cache_dynamic_ttl = 5; |
267 | ctx->cfg.cache_dynamic_ttl = 5; |
268 | ctx->cfg.cache_max_create_time = 5; |
268 | ctx->cfg.cache_max_create_time = 5; |
269 | ctx->cfg.cache_repo_ttl = 5; |
269 | ctx->cfg.cache_repo_ttl = 5; |
270 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; |
270 | ctx->cfg.cache_root = CGIT_CACHE_ROOT; |
271 | ctx->cfg.cache_root_ttl = 5; |
271 | ctx->cfg.cache_root_ttl = 5; |
272 | ctx->cfg.cache_scanrc_ttl = 15; |
272 | ctx->cfg.cache_scanrc_ttl = 15; |
273 | ctx->cfg.cache_static_ttl = -1; |
273 | ctx->cfg.cache_static_ttl = -1; |
274 | ctx->cfg.css = "/cgit.css"; |
274 | ctx->cfg.css = "/cgit.css"; |
275 | ctx->cfg.logo = "/cgit.png"; |
275 | ctx->cfg.logo = "/cgit.png"; |
|