diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-08-07 18:24:15 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-08-07 18:24:15 -0700 |
commit | 41d9d9cfe57c56a2425f7bd83e05a22f429e87c7 (patch) | |
tree | 374ee2acc6e58491ef02f4a2a23634324e9d3ca6 /mutt_ssl.c | |
parent | 04817c00c2340dbf5254d10556206182e0b3f1fd (diff) |
Allow nested setting of OPTIGNOREMACROEVENTS.
This will be needed for the first-run of autocrypt initialization.
The initialization involves a number of prompts, and can even use the
folder browser. The browser could in turn connect to IMAP which might
invoke a certificate prompt, login prompt, etc.
Diffstat (limited to 'mutt_ssl.c')
-rw-r--r-- | mutt_ssl.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1194,7 +1194,7 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a BUFFER *drow = NULL; unsigned u; FILE *fp; - int allow_skip = 0; + int allow_skip = 0, reset_ignoremacro = 0; mutt_push_current_menu (menu); @@ -1292,7 +1292,12 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a menu->help = helpstr; done = 0; - set_option(OPTIGNOREMACROEVENTS); + + if (!option (OPTIGNOREMACROEVENTS)) + { + set_option (OPTIGNOREMACROEVENTS); + reset_ignoremacro = 1; + } while (!done) { switch (mutt_menuLoop (menu)) @@ -1336,7 +1341,8 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a break; } } - unset_option(OPTIGNOREMACROEVENTS); + if (reset_ignoremacro) + unset_option (OPTIGNOREMACROEVENTS); mutt_buffer_pool_release (&drow); mutt_pop_current_menu (menu); |