aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-04-18 15:23:00 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-04-18 15:23:00 +0000
commit5d0b40340b5b5ed853d01ea687386eac721e342c (patch)
treea599754f6abf32d8ea7c9ef18c7bc0dc59f0b6b8 /src/main.c
parent71d23052e4bbb16978a2c38e151d2cbf71320e9d (diff)
downloadmailfromd-5d0b40340b5b5ed853d01ea687386eac721e342c.tar.gz
mailfromd-5d0b40340b5b5ed853d01ea687386eac721e342c.tar.bz2
When possible lock BDB databases directly.
For version 2.x fall back to external lock method. Fix handling of optional variables in built-in functions. git-svn-id: file:///svnroot/mailfromd/trunk@1365 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 450129fb..cec508bb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -944,12 +944,13 @@ enum mailfromd_option {
OPTION_PIDFILE,
OPTION_POSTMASTER_EMAIL,
OPTION_PREDICT_NEXT,
OPTION_SHOW_DEFAULTS,
OPTION_SINGLE_PROCESS,
OPTION_STACK_TRACE,
+ OPTION_STATE_DIRECTORY,
OPTION_SOURCE_INFO,
OPTION_SYSLOG,
OPTION_TIME_FORMAT,
OPTION_TIMEOUT,
OPTION_TRACE,
OPTION_TRACE_PROGRAM,
@@ -1008,13 +1009,14 @@ static struct argp_option options[] = {
N_("Set cache expiration interval to NUMBER seconds"), GRP+1 },
{ "all", OPTION_ALL, NULL, 0,
N_("With --compact or --expire: apply the operation to all "
"available databases"), GRP+1 },
{ "time-format", OPTION_TIME_FORMAT, N_("FMT"), 0,
N_("Output timestamps using given format (default \"%c\")"), GRP+1 },
-
+ { "state-directory", OPTION_STATE_DIRECTORY, N_("DIR"), 0,
+ N_("Set new program state directory"), GRP+1 },
#undef GRP
#define GRP 20
{ NULL, 0, NULL, 0,
N_("General options"), GRP },
{ "config-file", OPTION_CONFIG_FILE, N_("FILE"), OPTION_HIDDEN,
N_("Read configuration from FILE"), GRP+1 },
@@ -1357,13 +1359,17 @@ parse_opt (int key, char *arg, struct argp_state *state)
single_process_option = 1;
break;
case OPTION_STACK_TRACE:
set_option("stack-trace", "yes", 1);
break;
-
+
+ case OPTION_STATE_DIRECTORY:
+ set_option("state-directory", arg, 1);
+ break;
+
case OPTION_SOURCE_INFO:
set_option("source-info", "yes", 1);
break;
case OPTION_SYSLOG:
log_to_stderr = 0;

Return to:

Send suggestions and report system problems to the System administrator.