Adapt for new locker functions.
Showing
1 changed file
with
9 additions
and
9 deletions
... | @@ -25,7 +25,6 @@ int ex_quota_tempfail; /* Return temporary failure if mailbox quota is | ... | @@ -25,7 +25,6 @@ int ex_quota_tempfail; /* Return temporary failure if mailbox quota is |
25 | int exit_code = EX_OK; /* Exit code to be used */ | 25 | int exit_code = EX_OK; /* Exit code to be used */ |
26 | uid_t uid; /* Current user name */ | 26 | uid_t uid; /* Current user name */ |
27 | char *quotadbname = NULL; /* Name of mailbox quota database */ | 27 | char *quotadbname = NULL; /* Name of mailbox quota database */ |
28 | int lock_timeout = 300; /* Locking timeout in seconds */ | ||
29 | 28 | ||
30 | /* Debuggig options */ | 29 | /* Debuggig options */ |
31 | int debug_level; /* General debugging level */ | 30 | int debug_level; /* General debugging level */ |
... | @@ -90,8 +89,6 @@ static struct argp_option options[] = | ... | @@ -90,8 +89,6 @@ static struct argp_option options[] = |
90 | #endif | 89 | #endif |
91 | { "debug", 'x', N_("FLAGS"), 0, | 90 | { "debug", 'x', N_("FLAGS"), 0, |
92 | N_("Enable debugging"), 0 }, | 91 | N_("Enable debugging"), 0 }, |
93 | { "timeout", 't', N_("NUMBER"), 0, | ||
94 | N_("Set timeout for acquiring the lockfile") }, | ||
95 | { NULL, 0, NULL, 0, NULL, 0 } | 92 | { NULL, 0, NULL, 0, NULL, 0 } |
96 | }; | 93 | }; |
97 | 94 | ||
... | @@ -166,10 +163,6 @@ parse_opt (int key, char *arg, struct argp_state *state) | ... | @@ -166,10 +163,6 @@ parse_opt (int key, char *arg, struct argp_state *state) |
166 | sieve_pattern = optarg; | 163 | sieve_pattern = optarg; |
167 | break; | 164 | break; |
168 | 165 | ||
169 | case 't': | ||
170 | lock_timeout = strtoul (optarg, NULL, 0); | ||
171 | break; | ||
172 | |||
173 | case 'x': | 166 | case 'x': |
174 | do | 167 | do |
175 | { | 168 | { |
... | @@ -306,10 +299,19 @@ main (int argc, char *argv[]) | ... | @@ -306,10 +299,19 @@ main (int argc, char *argv[]) |
306 | /* Native Language Support */ | 299 | /* Native Language Support */ |
307 | mu_init_nls (); | 300 | mu_init_nls (); |
308 | 301 | ||
302 | /* Default locker settings */ | ||
303 | locker_set_default_flags (MU_LOCKER_PID|MU_LOCKER_RETRY, | ||
304 | mu_locker_set_flags); | ||
305 | locker_set_default_retry_timeout (1); | ||
306 | locker_set_default_retry_count (300); | ||
307 | |||
308 | /* Default error code for command line errors */ | ||
309 | mu_argp_error_code = EX_CONFIG; | 309 | mu_argp_error_code = EX_CONFIG; |
310 | /* Register needed modules */ | ||
310 | MU_AUTH_REGISTER_ALL_MODULES(); | 311 | MU_AUTH_REGISTER_ALL_MODULES(); |
311 | mu_argp_init (program_version, NULL); | 312 | mu_argp_init (program_version, NULL); |
312 | sieve_argp_init (); | 313 | sieve_argp_init (); |
314 | /* Parse command line */ | ||
313 | mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL); | 315 | mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL); |
314 | 316 | ||
315 | openlog ("mail.local", LOG_PID, log_facility); | 317 | openlog ("mail.local", LOG_PID, log_facility); |
... | @@ -687,8 +689,6 @@ deliver (mailbox_t imbx, char *name) | ... | @@ -687,8 +689,6 @@ deliver (mailbox_t imbx, char *name) |
687 | } | 689 | } |
688 | 690 | ||
689 | mailbox_get_locker (mbox, &lock); | 691 | mailbox_get_locker (mbox, &lock); |
690 | locker_set_flags (lock, MU_LOCKER_PID|MU_LOCKER_RETRY); | ||
691 | locker_set_retries (lock, lock_timeout); | ||
692 | 692 | ||
693 | status = locker_lock (lock); | 693 | status = locker_lock (lock); |
694 | 694 | ... | ... |
-
Please register or sign in to post a comment