diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-08-21 16:43:41 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-08-21 16:43:41 +0300 |
commit | 5455fa0bf63e8b8332445465757ee9be6c90b5cf (patch) | |
tree | 201d2df0936436b6dede97586dc8b2ae29d38a4c | |
parent | a6f656e00818fba5a681f7191b2d5039de1802eb (diff) | |
download | mailfromd-5455fa0bf63e8b8332445465757ee9be6c90b5cf.tar.gz mailfromd-5455fa0bf63e8b8332445465757ee9be6c90b5cf.tar.bz2 |
Fix namespace (pm -> mf)
-rw-r--r-- | lib/Makefile.am | 16 | ||||
-rw-r--r-- | lib/cache.c | 4 | ||||
-rw-r--r-- | lib/db.c | 6 | ||||
-rw-r--r-- | lib/dbcfg.c | 2 | ||||
-rw-r--r-- | lib/greylist.c | 4 | ||||
-rw-r--r-- | lib/libmf.h | 26 | ||||
-rw-r--r-- | lib/mf-dbm.c (renamed from lib/mu_dbm.c) | 2 | ||||
-rw-r--r-- | lib/mf-dbm.h (renamed from lib/mu_dbm.h) | 0 | ||||
-rw-r--r-- | lib/mfdb.h (renamed from lib/pmdb.h) | 0 | ||||
-rw-r--r-- | lib/namefixup.c | 10 | ||||
-rw-r--r-- | lib/optcache.c | 30 | ||||
-rw-r--r-- | lib/rate.c | 4 | ||||
-rw-r--r-- | lib/tbf_rate.c | 4 | ||||
-rw-r--r-- | po/POTFILES.in | 2 | ||||
-rw-r--r-- | src/Makefile.am | 14 | ||||
-rw-r--r-- | src/builtin/db.bi | 2 | ||||
-rw-r--r-- | src/calloutd.c | 10 | ||||
-rw-r--r-- | src/mailfromd.h | 2 | ||||
-rw-r--r-- | src/main.c | 34 | ||||
-rw-r--r-- | src/mfdbtool.c (renamed from src/pmtool.c) | 50 | ||||
-rw-r--r-- | src/savsrv.c | 4 | ||||
-rw-r--r-- | src/srvcfg.c | 50 | ||||
-rw-r--r-- | src/srvcfg.h | 8 |
23 files changed, 145 insertions, 139 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 4b29e6ee..85d9a2c7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -14,9 +14,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -noinst_LIBRARIES=libmf.a libdbm.a libpmdb.a +noinst_LIBRARIES=libmf.a libdbm.a libmfdb.a + +noinst_HEADERS = \ + libmf.h\ + syslog_async.h\ + mudefs.h\ + debug.h\ + dns.h\ + mfdb.h\ + filenames.h -noinst_HEADERS = libmf.h syslog_async.h mudefs.h debug.h dns.h pmdb.h filenames.h EXTRA_DIST = syslog_async.c SYSLOG_ASYNC_O=syslog_async.o @@ -48,9 +56,9 @@ libmf_a_SOURCES=\ libmf_a_LIBADD=$(LIBOBJS) $(BUILD_SYSLOG_ASYNC) libmf_a_DEPENDENCIES=$(BUILD_SYSLOG_ASYNC) -libdbm_a_SOURCES = mu_dbm.c mu_dbm.h +libdbm_a_SOURCES = mf-dbm.c mf-dbm.h -libpmdb_a_SOURCES = \ +libmfdb_a_SOURCES = \ db.c\ dbcfg.c\ cache.c\ diff --git a/lib/cache.c b/lib/cache.c index 78b4dced..8621666a 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -20,8 +20,8 @@ #include <mailutils/mailutils.h> #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" #include "filenames.h" @@ -26,8 +26,8 @@ #include "obstack.h" #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" int ignore_failed_reads_option;//FIXME; @@ -59,7 +59,7 @@ db_format_install(struct db_format *fmt) p = xmalloc(sizeof *p); p->fmt = *fmt; - pm_namefixup_register(&p->fmt.dbname, p->fmt.dbname); + mf_namefixup_register(&p->fmt.dbname, p->fmt.dbname); p->fmt.debug_handle = debug_register(p->fmt.name); p->next = db_fmt_list; db_fmt_list = p; diff --git a/lib/dbcfg.c b/lib/dbcfg.c index a0a7282a..7b8d6005 100644 --- a/lib/dbcfg.c +++ b/lib/dbcfg.c @@ -22,7 +22,7 @@ #include <mailutils/cfg.h> #include "xalloc.h" #include "libmf.h" -#include "pmdb.h" +#include "mfdb.h" static int cb_db_expire_interval(mu_debug_t err, void *data, mu_config_value_t *arg) diff --git a/lib/greylist.c b/lib/greylist.c index de625137..4bda809f 100644 --- a/lib/greylist.c +++ b/lib/greylist.c @@ -20,8 +20,8 @@ #include <mailutils/mailutils.h> #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" #include "filenames.h" diff --git a/lib/libmf.h b/lib/libmf.h index 48abd8c3..18192304 100644 --- a/lib/libmf.h +++ b/lib/libmf.h @@ -291,7 +291,7 @@ void mf_server_start(const char *program, const char *dir, /* optcache.c */ -struct pm_option_cache { +struct mf_option_cache { char *name; /* option name */ void *value; /* current value */ int (*handler)(char *opt, void **pval, char *newval); @@ -300,20 +300,20 @@ struct pm_option_cache { void (*set)(void *value); /* function that actually sets the option */ }; -#define PM_OCF_NULL 0x01 /* Option_cache array is NULL-terminated */ -#define PM_OCF_STATIC 0x02 /* Option_cache array is static. */ +#define MF_OCF_NULL 0x01 /* Option_cache array is NULL-terminated */ +#define MF_OCF_STATIC 0x02 /* Option_cache array is static. */ -void pm_optcache_add(struct pm_option_cache *tab, size_t size, int flags); -int pm_optcache_set_option(char *name, char *value); -void pm_optcache_flush(void); -int pm_option_string(char *opt, void **pval, char *newval); -int pm_option_boolean(char *opt, void **pval, char *newval); -int pm_option_time(char *opt, void **pval, char *newval); +void mf_optcache_add(struct mf_option_cache *tab, size_t size, int flags); +int mf_optcache_set_option(char *name, char *value); +void mf_optcache_flush(void); +int mf_option_string(char *opt, void **pval, char *newval); +int mf_option_boolean(char *opt, void **pval, char *newval); +int mf_option_time(char *opt, void **pval, char *newval); /* namefixup.c */ -void pm_namefixup_register(char **ptr, const char *initval); -void pm_file_name_ptr_fixup(char **ptr, char *dir, size_t dirlen); -void pm_namefixup_run(char *dir); -void pm_namefixup_free(void); +void mf_namefixup_register(char **ptr, const char *initval); +void mf_file_name_ptr_fixup(char **ptr, char *dir, size_t dirlen); +void mf_namefixup_run(char *dir); +void mf_namefixup_free(void); diff --git a/lib/mu_dbm.c b/lib/mf-dbm.c index cec23fb2..db9ca7b9 100644 --- a/lib/mu_dbm.c +++ b/lib/mf-dbm.c @@ -32,7 +32,7 @@ #include <errno.h> #include <mailutils/error.h> #include <mailutils/errno.h> -#include <mu_dbm.h> +#include <mf-dbm.h> #include "debug.h" #include "libmf.h" diff --git a/lib/mu_dbm.h b/lib/mf-dbm.h index a65a1eef..a65a1eef 100644 --- a/lib/mu_dbm.h +++ b/lib/mf-dbm.h diff --git a/lib/namefixup.c b/lib/namefixup.c index 04e1b247..988c35a7 100644 --- a/lib/namefixup.c +++ b/lib/namefixup.c @@ -31,7 +31,7 @@ struct namerec { static struct namerec *head, *tail; void -pm_namefixup_register(char **ptr, const char *initval) +mf_namefixup_register(char **ptr, const char *initval) { struct namerec *nrec = xmalloc(sizeof(*nrec)); nrec->next = NULL; @@ -46,7 +46,7 @@ pm_namefixup_register(char **ptr, const char *initval) } void -pm_file_name_ptr_fixup(char **ptr, char *dir, size_t dirlen) +mf_file_name_ptr_fixup(char **ptr, char *dir, size_t dirlen) { if (*ptr && **ptr != '/') { char *name = *ptr; @@ -61,17 +61,17 @@ pm_file_name_ptr_fixup(char **ptr, char *dir, size_t dirlen) } void -pm_namefixup_run(char *dir) +mf_namefixup_run(char *dir) { size_t dirlen = strlen(dir); struct namerec *p; for (p = head; p; p = p->next) - pm_file_name_ptr_fixup(p->nameptr, dir, dirlen); + mf_file_name_ptr_fixup(p->nameptr, dir, dirlen); } void -pm_namefixup_free() +mf_namefixup_free() { struct namerec *p = head; diff --git a/lib/optcache.c b/lib/optcache.c index 756596ee..9307f3e1 100644 --- a/lib/optcache.c +++ b/lib/optcache.c @@ -26,16 +26,16 @@ struct cache_list_elt { struct cache_list_elt *next; - struct pm_option_cache *opt; + struct mf_option_cache *opt; size_t size; }; static struct cache_list_elt *head, *tail; -static struct pm_option_cache * -optcache_dup(struct pm_option_cache *tab, size_t size) +static struct mf_option_cache * +optcache_dup(struct mf_option_cache *tab, size_t size) { - struct pm_option_cache *newtab = xcalloc(size, sizeof(*tab)); + struct mf_option_cache *newtab = xcalloc(size, sizeof(*tab)); size_t i; for (i = 0; i < size; i++) { @@ -46,7 +46,7 @@ optcache_dup(struct pm_option_cache *tab, size_t size) } void -pm_optcache_add(struct pm_option_cache *tab, size_t size, int flags) +mf_optcache_add(struct mf_option_cache *tab, size_t size, int flags) { struct cache_list_elt *elt; @@ -59,7 +59,7 @@ pm_optcache_add(struct pm_option_cache *tab, size_t size, int flags) tail = elt; /* If the array is null-terminated, compute its size */ - if (flags & PM_OCF_NULL) + if (flags & MF_OCF_NULL) for (size = 0; tab[size].name; size++) ; @@ -70,14 +70,14 @@ pm_optcache_add(struct pm_option_cache *tab, size_t size, int flags) elt->size = size; } -static struct pm_option_cache * +static struct mf_option_cache * find_option(char *name) { struct cache_list_elt *elt; for (elt = head; elt; elt = elt->next) { size_t i; - struct pm_option_cache *opt; + struct mf_option_cache *opt; for (i = 0, opt = elt->opt; i < elt->size; i++, opt++) { if (strcmp(opt->name, name) == 0) @@ -88,9 +88,9 @@ find_option(char *name) } int -pm_optcache_set_option(char *name, char *value) +mf_optcache_set_option(char *name, char *value) { - struct pm_option_cache *p = find_option(name); + struct mf_option_cache *p = find_option(name); if (!p) { errno = ENOENT; return 1; @@ -99,13 +99,13 @@ pm_optcache_set_option(char *name, char *value) } void -pm_optcache_flush() +mf_optcache_flush() { struct cache_list_elt *elt; for (elt = head; elt; elt = elt->next) { size_t i; - struct pm_option_cache *opt; + struct mf_option_cache *opt; for (i = 0, opt = elt->opt; i < elt->size; i++, opt++) if (opt->value && opt->set) @@ -115,7 +115,7 @@ pm_optcache_flush() int -pm_option_string(char *opt, void **pval, char *newval) +mf_option_string(char *opt, void **pval, char *newval) { if (*pval) free(*pval); @@ -124,7 +124,7 @@ pm_option_string(char *opt, void **pval, char *newval) } int -pm_option_boolean(char *opt, void **pval, char *newval) +mf_option_boolean(char *opt, void **pval, char *newval) { int val; @@ -151,7 +151,7 @@ pm_option_boolean(char *opt, void **pval, char *newval) } int -pm_option_time(char *opt, void **pval, char *newval) +mf_option_time(char *opt, void **pval, char *newval) { time_t interval; const char *endp; @@ -20,8 +20,8 @@ #include <mailutils/mailutils.h> #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" #include "filenames.h" diff --git a/lib/tbf_rate.c b/lib/tbf_rate.c index d2f17bc6..171653da 100644 --- a/lib/tbf_rate.c +++ b/lib/tbf_rate.c @@ -22,8 +22,8 @@ #include <mailutils/mailutils.h> #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" #include "filenames.h" #include "inttypes.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index 5d60c849..9abd5a38 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -98,7 +98,7 @@ src/main.c src/mf-status.c src/optab.c src/optab.h -src/pmtool.c +src/mfdbtool.c src/pp.c src/pragma.c src/prog.c diff --git a/src/Makefile.am b/src/Makefile.am index ee16f861..f1ccf972 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. sbin_PROGRAMS = mailfromd calloutd -bin_PROGRAMS = pmtool +bin_PROGRAMS = mfdbtool SUBDIRS = builtin incdir=$(pkgdatadir)/$(VERSION)/include inc_DATA = status.mf status.mfh @@ -47,7 +47,7 @@ mailfromd_SOURCES = \ mailfromd_LDADD = \ ./libcallout.a\ builtin/libbuiltin.a\ - ../lib/libpmdb.a\ + ../lib/libmfdb.a\ ../lib/libmf.a\ ../lib/libdbm.a\ ../gnu/libgnu.a\ @@ -69,18 +69,18 @@ calloutd_SOURCES = \ calloutd_LDADD = \ ./libcallout.a\ - ../lib/libpmdb.a\ + ../lib/libmfdb.a\ ../lib/libmf.a\ ../lib/libdbm.a\ ../gnu/libgnu.a\ $(MAILUTILS_LIBS)\ $(MILTER) -pmtool_SOURCES = \ - pmtool.c +mfdbtool_SOURCES = \ + mfdbtool.c -pmtool_LDADD = \ - ../lib/libpmdb.a\ +mfdbtool_LDADD = \ + ../lib/libmfdb.a\ ../lib/libmf.a\ ../lib/libdbm.a\ ../gnu/libgnu.a\ diff --git a/src/builtin/db.bi b/src/builtin/db.bi index 376689bf..693e7a19 100644 --- a/src/builtin/db.bi +++ b/src/builtin/db.bi @@ -16,7 +16,7 @@ #define DEFAULT_DB_MODE 0640 #include <fnmatch.h> -#include "mu_dbm.h" +#include "mf-dbm.h" struct db_prop { /* Database properties */ char *pat; /* Database name pattern */ diff --git a/src/calloutd.c b/src/calloutd.c index 959ad7c0..1b338b02 100644 --- a/src/calloutd.c +++ b/src/calloutd.c @@ -38,8 +38,8 @@ #include "srvman.h" #include "srvcfg.h" #include "debug.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" void xalloc_die() @@ -131,7 +131,7 @@ static struct argp argp = { int -pm_server_function(const char *key, mfd_server_func_t *pret) +mf_server_function(const char *key, mfd_server_func_t *pret) { *pret = callout_session_server; return 0; @@ -159,7 +159,7 @@ main(int argc, char **argv) database_cfg_init(); mu_acl_cfg_init(); srvman_init(); - pm_srvcfg_init(NULL); + mf_srvcfg_init(NULL); mu_argp_init(program_version, "<" PACKAGE_BUGREPORT ">"); mu_app_rcfile = SYSCONFDIR "/calloutd.conf";//FIXME @@ -167,7 +167,7 @@ main(int argc, char **argv) 0, NULL, NULL, NULL); if (rc) exit(EX_CONFIG); - pm_srvcfg_flush(); + mf_srvcfg_flush(); mf_server_start("calloutd", mailfromd_state_dir, pidfile, server_flags); diff --git a/src/mailfromd.h b/src/mailfromd.h index d3058c71..2dc0d143 100644 --- a/src/mailfromd.h +++ b/src/mailfromd.h @@ -28,7 +28,7 @@ #include <obstack.h> #include "libmf.h" -#include "pmdb.h" +#include "mfdb.h" #include "bitmask.h" #include "filenames.h" @@ -43,7 +43,7 @@ #include "inttostr.h" #include "srvcfg.h" #include "filenames.h" -#include "mu_dbm.h" +#include "mf-dbm.h" #include "builtin.h" #include "prog.h" @@ -304,9 +304,9 @@ option_relay(char *opt, void **pval, char *newval) return 0; } -struct pm_option_cache option_cache[] = { - { "stack-trace", NULL, pm_option_boolean, set_stack_trace }, - { "milter-timeout", NULL, pm_option_time, set_milter_timeout }, +struct mf_option_cache option_cache[] = { + { "stack-trace", NULL, mf_option_boolean, set_stack_trace }, + { "milter-timeout", NULL, mf_option_time, set_milter_timeout }, { "relay", NULL, option_relay, set_relay }, { NULL } }; @@ -548,7 +548,7 @@ parse_opt(int key, char *arg, struct argp_state *state) break; case 'p': - pm_optcache_set_option("port", arg); + mf_optcache_set_option("port", arg); break; case OPTION_RUN: @@ -604,7 +604,7 @@ parse_opt(int key, char *arg, struct argp_state *state) break; case OPTION_DOMAIN_FILE: - pm_optcache_set_option("relay", arg); + mf_optcache_set_option("relay", arg); break; case OPTION_DUMP_CODE: @@ -649,7 +649,7 @@ parse_opt(int key, char *arg, struct argp_state *state) } case OPTION_MILTER_TIMEOUT: - pm_optcache_set_option("milter-timeout", arg); + mf_optcache_set_option("milter-timeout", arg); break; case OPTION_MTASIM: @@ -663,11 +663,11 @@ parse_opt(int key, char *arg, struct argp_state *state) break; case OPTION_STACK_TRACE: - pm_optcache_set_option("stack-trace", "yes"); + mf_optcache_set_option("stack-trace", "yes"); break; case OPTION_TIMEOUT: - pm_optcache_set_option("timeout", arg); + mf_optcache_set_option("timeout", arg); break; case OPTION_TRACE: @@ -1144,7 +1144,7 @@ provide_default_milter_server() mu_diag_output(MU_DIAG_WARNING, _("no servers defined; will listen on %s"), DEFAULT_SOCKET); - pm_srvcfg_add("milter", DEFAULT_SOCKET); + mf_srvcfg_add("milter", DEFAULT_SOCKET); } } @@ -1163,7 +1163,7 @@ provide_default_callout_server() val.v.literal = string_alloc(DEFAULT_CALLOUT_SOCKET, sizeof(DEFAULT_CALLOUT_SOCKET)-1); ensure_initialized_variable("callout_server_url", &val); - pm_srvcfg_add("callout", val.v.literal->text); + mf_srvcfg_add("callout", val.v.literal->text); } } @@ -1177,7 +1177,7 @@ static char *modnames[] = { int -pm_server_function(const char *key, mfd_server_func_t *pret) +mf_server_function(const char *key, mfd_server_func_t *pret) { if (!key || strcmp(key, "default") == 0 || strcmp(key, "milter") == 0) *pret = milter_session_server; @@ -1222,13 +1222,13 @@ main(int argc, char **argv) db_format_setup(); include_path_setup(); pragma_setup(); - pm_optcache_add(option_cache, 0, PM_OCF_NULL|PM_OCF_STATIC); + mf_optcache_add(option_cache, 0, MF_OCF_NULL|MF_OCF_STATIC); mf_server_save_cmdline(argc, argv); mu_acl_cfg_init(); database_cfg_init(); srvman_init(); - pm_srvcfg_init(N_("(milter | server)")); + mf_srvcfg_init(N_("(milter | server)")); mu_argp_init(program_version, "<" PACKAGE_BUGREPORT ">"); mu_app_rcfile = DEFAULT_CONFIG_FILE; @@ -1282,7 +1282,7 @@ main(int argc, char **argv) if (parse_program(script_file, script_ydebug)) exit(EX_CONFIG); } - pm_srvcfg_flush(); + mf_srvcfg_flush(); fixup_create_script(); @@ -1342,8 +1342,8 @@ main(int argc, char **argv) free_string_space(); free_parser_data(); - pm_namefixup_run(mailfromd_state_dir); - pm_namefixup_free(); + mf_namefixup_run(mailfromd_state_dir); + mf_namefixup_free(); switch (mode) { case MAILFROMD_DAEMON: diff --git a/src/pmtool.c b/src/mfdbtool.c index d0c250fd..b996d296 100644 --- a/src/pmtool.c +++ b/src/mfdbtool.c @@ -29,12 +29,10 @@ #include <mailutils/daemon.h> #include "libmf.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "debug.h" -#define PMTOOL_SOURCE 0 - char *state_dir = DEFAULT_STATE_DIR; char *file_option; /* File name for DB management commands */ struct db_format *format_option; @@ -100,7 +98,7 @@ convert_rate(const char *arg, double *rate) void -pmtool_delete(int argc, char **argv) +mfdbtool_delete(int argc, char **argv) { int i; char *name = get_db_name(); @@ -110,7 +108,7 @@ pmtool_delete(int argc, char **argv) } void -pmtool_list(int argc, char **argv) +mfdbtool_list(int argc, char **argv) { int rc; char *name = get_db_name(); @@ -143,7 +141,7 @@ db_proc_enumerator(struct db_format *fmt, void *data) } void -pmtool_expire(int argc, char **argv) +mfdbtool_expire(int argc, char **argv) { //priv_setup();FIXME if (all_option) @@ -158,7 +156,7 @@ pmtool_expire(int argc, char **argv) } void -pmtool_compact(int argc, char **argv) +mfdbtool_compact(int argc, char **argv) { //priv_setup();FIXME if (all_option) @@ -174,8 +172,8 @@ pmtool_compact(int argc, char **argv) -const char *program_version = "pmtool (" PACKAGE_STRING ")"; -static char doc[] = N_("pmtool -- PostMACS database management tool"); +const char *program_version = "mfdbtool (" PACKAGE_STRING ")"; +static char doc[] = N_("mfdbtool -- Mailfromd database management tool"); static char args_doc[] = ""; enum { @@ -256,17 +254,17 @@ parse_opt(int key, char *arg, struct argp_state *state) { switch (key) { case OPTION_STATE_DIRECTORY: - pm_optcache_set_option("state-directory", arg); + mf_optcache_set_option("state-directory", arg); break; #if 0 /* FIXME */ case OPTION_LOCK_RETRY_COUNT: - pm_optcacheset_option("lock-retry-count", arg); + mf_optcacheset_option("lock-retry-count", arg); case OPTION_LOCK_RETRY_TIMEOUT: - pm_optcacheset_option("lock-retry-timeout", arg); + mf_optcacheset_option("lock-retry-timeout", arg); #endif case 'd': - pm_optcache_set_option("debug", arg); + mf_optcache_set_option("debug", arg); break; case 'e': { @@ -311,26 +309,26 @@ parse_opt(int key, char *arg, struct argp_state *state) break; case OPTION_DELETE: - run = pmtool_delete; + run = mfdbtool_delete; break; case OPTION_LIST: - run = pmtool_list; + run = mfdbtool_list; break; case OPTION_EXPIRE: - run = pmtool_expire; + run = mfdbtool_expire; break; case OPTION_COMPACT: - run = pmtool_compact; + run = mfdbtool_compact; break; case ARGP_KEY_FINI: if (!run) argp_error(state, _("you must specify one of --list, --delete, --expire or --compat")); if (all_option && - !(run == pmtool_compact || run == pmtool_expire)) + !(run == mfdbtool_compact || run == mfdbtool_expire)) argp_error(state, _("--all is meaningful only with " "--expire or --compact option")); @@ -391,9 +389,9 @@ set_debug(void *value) debug_parse_spec(value); } -static struct pm_option_cache option_cache[] = { - { "state-directory", NULL, pm_option_string, set_state_directory }, - { "debug", NULL, pm_option_string, set_debug }, +static struct mf_option_cache option_cache[] = { + { "state-directory", NULL, mf_option_string, set_state_directory }, + { "debug", NULL, mf_option_string, set_debug }, { NULL } }; @@ -416,7 +414,7 @@ static struct argp argp = { static void version(FILE *stream, struct argp_state *state) { - mailfromd_version("pmtool", stream); + mailfromd_version("mfdbtool", stream); } void @@ -440,16 +438,16 @@ main(int argc, char **argv) db_format_setup(); database_cfg_init(); - pm_optcache_add(option_cache, 0, PM_OCF_NULL|PM_OCF_STATIC); + mf_optcache_add(option_cache, 0, MF_OCF_NULL|MF_OCF_STATIC); mu_argp_init(program_version, "<" PACKAGE_BUGREPORT ">"); - mu_app_rcfile = SYSCONFDIR "/pmtool.conf";//FIXME + mu_app_rcfile = SYSCONFDIR "/mfdbtool.conf";//FIXME rc = mfd_app_init(&argp, capa, callout_cfg_param, argc, argv, 0, &index, NULL, NULL); if (rc) exit(EX_CONFIG); - pm_optcache_flush(); + mf_optcache_flush(); argv += index; argc -= index; diff --git a/src/savsrv.c b/src/savsrv.c index 234f0b95..96850d66 100644 --- a/src/savsrv.c +++ b/src/savsrv.c @@ -35,8 +35,8 @@ #include "libmf.h" #include "callout.h" #include "debug.h" -#include "pmdb.h" -#include "mu_dbm.h" +#include "mfdb.h" +#include "mf-dbm.h" #include "callout-dbgmod.h" char *ehlo_domain; diff --git a/src/srvcfg.c b/src/srvcfg.c index 2064c4a0..2a0951ca 100644 --- a/src/srvcfg.c +++ b/src/srvcfg.c @@ -72,7 +72,7 @@ time_t negative_expire_interval = DEFAULT_EXPIRE_INTERVAL/2; /* Expire negative cache entries after this number of seconds */ -extern int pm_server_function(const char *key, mfd_server_func_t *pret); +extern int mf_server_function(const char *key, mfd_server_func_t *pret); static const char * @@ -220,7 +220,7 @@ option_pidfile(char *opt, void **pval, char *newval) mu_error(_("invalid pidfile name: must be absolute")); return 1; } - return pm_option_string(opt, pval, newval); + return mf_option_string(opt, pval, newval); } static void @@ -280,7 +280,7 @@ option_state_directory(char *opt, void **pval, char *newval) } void -pm_srvcfg_add(const char *type, const char *urlstr) +mf_srvcfg_add(const char *type, const char *urlstr) { mu_url_t url; const char *id = next_server_id(); @@ -288,7 +288,7 @@ pm_srvcfg_add(const char *type, const char *urlstr) mfd_server_func_t server; mu_diag_get_debug(&dbg); - if (pm_server_function(type, &server)) { + if (mf_server_function(type, &server)) { mu_error(_("INTERNAL ERROR: no such server type: %s"), type); exit(EX_SOFTWARE); } @@ -305,7 +305,7 @@ pm_srvcfg_add(const char *type, const char *urlstr) static void set_port(void *value) { - pm_srvcfg_add("default", value); + mf_srvcfg_add("default", value); } static int @@ -345,18 +345,18 @@ set_source_ip(void *value) source_address = *(unsigned long*)value; } -static struct pm_option_cache srv_option_cache[] = { - { "debug", NULL, pm_option_string, set_debug }, - { "source-info", NULL, pm_option_boolean, set_source_info }, - { "user", NULL, pm_option_string, set_user }, +static struct mf_option_cache srv_option_cache[] = { + { "debug", NULL, mf_option_string, set_debug }, + { "source-info", NULL, mf_option_boolean, set_source_info }, + { "user", NULL, mf_option_string, set_user }, { "group", NULL, option_group, NULL }, { "pidfile", NULL, option_pidfile, set_pidfile }, { "source-ip", NULL, option_source_ip, set_source_ip }, - { "io-timeout", NULL, pm_option_time, set_io_timeout }, - { "logger", NULL, pm_option_string, set_logger_option }, + { "io-timeout", NULL, mf_option_time, set_io_timeout }, + { "logger", NULL, mf_option_string, set_logger_option }, { "state-directory", NULL, option_state_directory, set_state_directory }, - { "port", NULL, pm_option_string, set_port }, + { "port", NULL, mf_option_string, set_port }, { NULL } }; @@ -448,7 +448,7 @@ server_section_parser(enum mu_cfg_section_stage stage, tree->debug)) return 1; /* FIXME */ - if (pm_server_function(node->label->v.string, + if (mf_server_function(node->label->v.string, &server_config_stmt.server)) { mu_cfg_format_error (tree->debug, MU_DEBUG_ERROR, @@ -715,7 +715,7 @@ srv_parse_opt(int key, char *arg, struct argp_state *state) { switch (key) { case 'd': - pm_optcache_set_option("debug", arg); + mf_optcache_set_option("debug", arg); break; case OPTION_LOG_TAG: @@ -727,7 +727,7 @@ srv_parse_opt(int key, char *arg, struct argp_state *state) break; case 'S': - pm_optcache_set_option("source-ip", arg); + mf_optcache_set_option("source-ip", arg); break; case 's': @@ -735,11 +735,11 @@ srv_parse_opt(int key, char *arg, struct argp_state *state) break; case 'u': - pm_optcache_set_option("user", arg); + mf_optcache_set_option("user", arg); break; case 'g': - pm_optcache_set_option("group", arg); + mf_optcache_set_option("group", arg); break; case 'X': @@ -752,11 +752,11 @@ srv_parse_opt(int key, char *arg, struct argp_state *state) break; case OPTION_LOGGER: - pm_optcache_set_option("logger", arg); + mf_optcache_set_option("logger", arg); break; case OPTION_PIDFILE: - pm_optcache_set_option("pidfile", arg); + mf_optcache_set_option("pidfile", arg); break; case OPTION_SINGLE_PROCESS: @@ -764,11 +764,11 @@ srv_parse_opt(int key, char *arg, struct argp_state *state) break; case OPTION_SOURCE_INFO: - pm_optcache_set_option("source-info", "yes"); + mf_optcache_set_option("source-info", "yes"); break; case OPTION_STATE_DIRECTORY: - pm_optcache_set_option("state-directory", arg); + mf_optcache_set_option("state-directory", arg); break; case OPTION_SYSLOG: @@ -804,7 +804,7 @@ srvcfg_gocs_init(enum mu_gocs_op op, void *data) } void -pm_srvcfg_init(const char *label) |