X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=imap-send.c;h=ba72fa4b6e2fcebc74e611ed1ca200a37b9f339d;hb=bde873c52914b40377a12764cab926ee974c3f32;hp=51f371ba9f08637657ec9198cf3f16d0c0407232;hpb=b10b9184afc9e62140d307dcf2f5d7e625f78c79;p=git.git diff --git a/imap-send.c b/imap-send.c index 51f371ba9..ba72fa4b6 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1331,11 +1331,16 @@ static int git_imap_config(const char *key, const char *val, void *cb) if (strncmp(key, imap_key, sizeof imap_key - 1)) return 0; - if (!val) - return config_error_nonbool(key); - key += sizeof imap_key - 1; + /* check booleans first, and barf on others */ + if (!strcmp("sslverify", key)) + server.ssl_verify = git_config_bool(key, val); + else if (!strcmp("preformattedhtml", key)) + server.use_html = git_config_bool(key, val); + else if (!val) + return config_error_nonbool(key); + if (!strcmp("folder", key)) { imap_folder = xstrdup(val); } else if (!strcmp("host", key)) { @@ -1356,10 +1361,6 @@ static int git_imap_config(const char *key, const char *val, void *cb) server.port = git_config_int(key, val); else if (!strcmp("tunnel", key)) server.tunnel = xstrdup(val); - else if (!strcmp("sslverify", key)) - server.ssl_verify = git_config_bool(key, val); - else if (!strcmp("preformattedHTML", key)) - server.use_html = git_config_bool(key, val); return 0; }