mirror of https://github.com/omar-polo/gmid.git
don't load the built-in list when using `types'
This commit is contained in:
parent
9b64995359
commit
54203115cd
2
gmid.c
2
gmid.c
|
@ -251,7 +251,7 @@ static int
|
|||
listener_main(struct imsgbuf *ibuf)
|
||||
{
|
||||
drop_priv();
|
||||
if (load_default_mime(&conf.mime) == -1)
|
||||
if (!conf.mime.skip_defaults && load_default_mime(&conf.mime) == -1)
|
||||
fatal("load_default_mime: %s", strerror(errno));
|
||||
load_vhosts();
|
||||
loop(ctx, sock4, sock6, ibuf);
|
||||
|
|
11
gmid.h
11
gmid.h
|
@ -182,8 +182,15 @@ struct etm { /* extension to mime */
|
|||
|
||||
struct mime {
|
||||
struct etm *t;
|
||||
size_t len;
|
||||
size_t cap;
|
||||
size_t len;
|
||||
size_t cap;
|
||||
|
||||
/*
|
||||
* Backward compatibility: types override the built-in list,
|
||||
* but the deprecated `mime' and `map' don't. It's still too
|
||||
* early to remove `mime' and `map' from the config parser.
|
||||
*/
|
||||
int skip_defaults;
|
||||
};
|
||||
|
||||
struct conf {
|
||||
|
|
Loading…
Reference in New Issue