aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-11-02 16:46:24 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-11-02 16:46:24 +0200
commit3457c19206858d3e8155dcfc776df8818d05824b (patch)
tree964b85710a9329541f253f34ce24255330dea986
parent30da6df2e8795478914a601feebf9cc4ab2f0cfc (diff)
downloadsmap-3457c19206858d3e8155dcfc776df8818d05824b.tar.gz
smap-3457c19206858d3e8155dcfc776df8818d05824b.tar.bz2
Follow Mailutils commit dc62b399
-rw-r--r--modules/mailutils/mailutils.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/modules/mailutils/mailutils.c b/modules/mailutils/mailutils.c
index 26d04d6..b383bdb 100644
--- a/modules/mailutils/mailutils.c
+++ b/modules/mailutils/mailutils.c
@@ -564,49 +564,48 @@ create_log_stream (mu_stream_t *pstream)
}
return 0;
}
#ifndef MU_PARSE_CONFIG_PLAIN
# define MU_PARSE_CONFIG_PLAIN 0
#endif
static void
init_hints(struct mu_cfg_parse_hints *hints)
{
- hints->flags |= MU_PARSE_CONFIG_PLAIN |
- MU_CFG_PARSE_SITE_RCFILE | MU_CFG_PARSE_PROGRAM;
- hints->site_rcfile = mu_site_config_file();
+ hints->flags |= MU_CFHINT_SITE_FILE | MU_CFHINT_PROGRAM;
+ hints->site_file = mu_site_config_file();
hints->program = (char*) mu_program_name;
}
static int
mod_mailutils_init(int argc, char **argv)
{
int rc;
struct mu_cfg_tree *parse_tree = NULL;
struct mu_cfg_parse_hints hints = { 0 };
mu_stream_t logstr;
struct smap_option init_option[] = {
{ SMAP_OPTSTR(positive-reply), smap_opt_string,
&dfl_positive_reply },
{ SMAP_OPTSTR(negative-reply), smap_opt_string,
&dfl_negative_reply },
{ SMAP_OPTSTR(onerror-reply), smap_opt_string,
&dfl_onerror_reply },
{ SMAP_OPTSTR(config-verbose), smap_opt_bitmask,
- &hints.flags, { MU_PARSE_CONFIG_VERBOSE } },
+ &hints.flags, { MU_CF_VERBOSE } },
{ SMAP_OPTSTR(config-dump), smap_opt_bitmask,
- &hints.flags, { MU_PARSE_CONFIG_DUMP } },
+ &hints.flags, { MU_CF_DUMP } },
{ NULL }
};
mu_set_program_name("smap-mailutils"); /**argv++*/
/* Create MU log stream. Reference it twice lest it gets released
during mu_gocs_flush (see below) */
if (create_log_stream (&logstr))
return 1;
mu_stream_ref (logstr);
mu_strerr = logstr;
dbgid = smap_debug_alloc("mailutils");
@@ -651,27 +650,27 @@ mod_mailutils_init_db(const char *dbid, int argc, char **argv)
struct smap_option init_option[] = {
{ SMAP_OPTSTR(mode), smap_opt_enum, &mode,
{ enumstr: mode_choice } },
{ SMAP_OPTSTR(positive-reply), smap_opt_string,
&positive_reply },
{ SMAP_OPTSTR(negative-reply), smap_opt_string,
&negative_reply },
{ SMAP_OPTSTR(onerror-reply), smap_opt_string,
&onerror_reply },
{ SMAP_OPTSTR(config-file), smap_opt_string,
&config_file },
{ SMAP_OPTSTR(config-verbose), smap_opt_bitmask,
- &cfgflags, { MU_PARSE_CONFIG_VERBOSE } },
+ &cfgflags, { MU_CF_VERBOSE } },
{ SMAP_OPTSTR(config-dump), smap_opt_bitmask,
- &cfgflags, { MU_PARSE_CONFIG_DUMP } },
+ &cfgflags, { MU_CF_DUMP } },
{ NULL }
};
if (smap_parseopt(init_option, argc, argv, 0, NULL))
return NULL;
db = malloc(sizeof(*db));
if (!db) {
mu_error("not enough memory");
return NULL;
}
db->id = dbid;
@@ -706,27 +705,27 @@ mod_mailutils_open(smap_database_t dbp)
if (db->config_file) {
struct mu_cfg_parse_hints hints = { db->config_flags };
mu_cfg_tree_t *tree = NULL;
int rc;
init_hints(&hints);
if (init_cfg_capa())
return 1;
mu_cfg_error_count = 0;
mu_cfg_parser_verbose = 0;
- if (db->config_flags & MU_PARSE_CONFIG_VERBOSE)
+ if (db->config_flags & MU_CF_VERBOSE)
mu_cfg_parser_verbose++;
- if (db->config_flags & MU_PARSE_CONFIG_DUMP)
+ if (db->config_flags & MU_CF_DUMP)
mu_cfg_parser_verbose++;
rc = mu_cfg_parse_file(&tree, db->config_file,
db->config_flags);
if (rc) {
mu_error("error parsing %s: %s", db->config_file,
mu_strerror(rc));
return 1;
}
mu_cfg_tree_postprocess(tree, &hints);

Return to:

Send suggestions and report system problems to the System administrator.