summaryrefslogtreecommitdiff
path: root/mail.local
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-12-30 07:47:38 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-12-30 07:47:38 +0000
commit778fc98bebaff26bd9adb1eebef5ac891c41af99 (patch)
tree3e2c1ac4e31fde38776419fed02103e2aa9f6959 /mail.local
parentecb3f088be038c33bef2530c4befaf226f5c1464 (diff)
downloadmailutils-778fc98bebaff26bd9adb1eebef5ac891c41af99.tar.gz
mailutils-778fc98bebaff26bd9adb1eebef5ac891c41af99.tar.bz2
Adapt for new locker functions.
Diffstat (limited to 'mail.local')
-rw-r--r--mail.local/main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mail.local/main.c b/mail.local/main.c
index 5131811cb..556990b7d 100644
--- a/mail.local/main.c
+++ b/mail.local/main.c
@@ -25,7 +25,6 @@ int ex_quota_tempfail; /* Return temporary failure if mailbox quota is
int exit_code = EX_OK; /* Exit code to be used */
uid_t uid; /* Current user name */
char *quotadbname = NULL; /* Name of mailbox quota database */
-int lock_timeout = 300; /* Locking timeout in seconds */
/* Debuggig options */
int debug_level; /* General debugging level */
@@ -90,8 +89,6 @@ static struct argp_option options[] =
#endif
{ "debug", 'x', N_("FLAGS"), 0,
N_("Enable debugging"), 0 },
- { "timeout", 't', N_("NUMBER"), 0,
- N_("Set timeout for acquiring the lockfile") },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -166,10 +163,6 @@ parse_opt (int key, char *arg, struct argp_state *state)
sieve_pattern = optarg;
break;
- case 't':
- lock_timeout = strtoul (optarg, NULL, 0);
- break;
-
case 'x':
do
{
@@ -305,11 +298,20 @@ main (int argc, char *argv[])
/* Native Language Support */
mu_init_nls ();
-
+
+ /* Default locker settings */
+ locker_set_default_flags (MU_LOCKER_PID|MU_LOCKER_RETRY,
+ mu_locker_set_flags);
+ locker_set_default_retry_timeout (1);
+ locker_set_default_retry_count (300);
+
+ /* Default error code for command line errors */
mu_argp_error_code = EX_CONFIG;
+ /* Register needed modules */
MU_AUTH_REGISTER_ALL_MODULES();
mu_argp_init (program_version, NULL);
sieve_argp_init ();
+ /* Parse command line */
mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL);
openlog ("mail.local", LOG_PID, log_facility);
@@ -687,8 +689,6 @@ deliver (mailbox_t imbx, char *name)
}
mailbox_get_locker (mbox, &lock);
- locker_set_flags (lock, MU_LOCKER_PID|MU_LOCKER_RETRY);
- locker_set_retries (lock, lock_timeout);
status = locker_lock (lock);

Return to:

Send suggestions and report system problems to the System administrator.