aboutsummaryrefslogtreecommitdiff
path: root/mime.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-09 17:18:04 +0000
committerOmar Polo <op@omarpolo.com>2023-06-09 17:18:04 +0000
commitaf1dab18702cf135aa80bf15065f73050c915347 (patch)
tree0313c88a607ca1079a63a5c6d86df04cc606d649 /mime.c
parente45334e6ae0b658a2d3d4f47bc3e9ddfdb83a44f (diff)
don't have the config being a global
Diffstat (limited to 'mime.c')
-rw-r--r--mime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mime.c b/mime.c
index 9197c8b..6176c2a 100644
--- a/mime.c
+++ b/mime.c
@@ -136,7 +136,7 @@ mime_find(const void *a, const void *b)
}
const char *
-mime(struct vhost *host, const char *path)
+mime(struct conf *conf, struct vhost *host, const char *path)
{
const char *def, *ext;
struct etm *t;
@@ -146,7 +146,7 @@ mime(struct vhost *host, const char *path)
if ((ext = path_ext(path)) == NULL)
return def;
- t = bsearch(ext, conf.mime.t, conf.mime.len, sizeof(*conf.mime.t),
+ t = bsearch(ext, conf->mime.t, conf->mime.len, sizeof(*conf->mime.t),
mime_find);
if (t != NULL)
return t->mime;