diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-02-26 22:41:24 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-02-26 23:15:39 +0200 |
commit | 795b7f52f03db80ef079b28e53070471f2959153 (patch) | |
tree | 851596fe85fe031bb471268023d3a45b05642412 /src/main.c | |
parent | 649cc9a9c5384137194f32d11de8e3037cd05ff1 (diff) | |
download | mailfromd-795b7f52f03db80ef079b28e53070471f2959153.tar.gz mailfromd-795b7f52f03db80ef079b28e53070471f2959153.tar.bz2 |
Restore legacy lock-* configuration statements.
* lib/libmf.h (config_cb_lock_retry_count)
(config_cb_lock_retry_timeout)
(mf_option_size_t,mf_init_lock_options): New prototypes.
* lib/optcache.c (mf_option_size_t): New function.
* lib/utils.c (config_cb_lock_retry_count)
(config_cb_lock_retry_timeout)
(mf_init_lock_options): New functions.
* src/main.c (mf_cfg_param): Restore lock-retry-count and
lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/mfdbtool.c (mfdbtool_cfg_param): Restore lock-retry-count and
lock-retry-timeout for backward compatibility.
(main): Call mf_init_lock_options.
* src/calloutd.c: Likewise.
* lib/close-fds.c (close_fds_except): Don't access FD_SET unless
i is less than FD_SETSIZE.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -694,6 +694,7 @@ static const char *capa[] = { "common", "debug", "logging", + "locking", "mailer", NULL }; @@ -918,10 +919,12 @@ struct mu_cfg_param mf_cfg_param[] = { { "database", mu_cfg_section, NULL }, - { "lock-retry-count", mu_cfg_callback, 0, 0, config_cb_ignore, - N_("Ignored for backward compatibility.") }, - { "lock-retry-timeout", mu_cfg_callback, 0,0, config_cb_ignore, - N_("Ignored for backward compatibility."), + { "lock-retry-count", mu_cfg_callback, NULL, 0, + config_cb_lock_retry_count, + N_("Retry acquiring DBM file lock this number of times.") }, + { "lock-retry-timeout", mu_cfg_callback, NULL, 0, + config_cb_lock_retry_timeout, + N_("Set the time span between the two DBM locking attempts."), N_("time") }, { "max-match-mx", mu_cfg_size, &max_match_mx, 0, NULL, @@ -1219,7 +1222,9 @@ main(int argc, char **argv) db_format_setup(); include_path_setup(); pragma_setup(); + mf_init_lock_options(); mf_optcache_add(option_cache, 0, MF_OCF_NULL|MF_OCF_STATIC); + mf_server_save_cmdline(argc, argv); dnsbase_init(); |