Use mu_argp_parse. (deliver): Restored erroneously removed variable sb.
Showing
1 changed file
with
14 additions
and
3 deletions
... | @@ -46,6 +46,8 @@ static char args_doc[] = "recipient [recipient ...]"; | ... | @@ -46,6 +46,8 @@ static char args_doc[] = "recipient [recipient ...]"; |
46 | 46 | ||
47 | static struct argp_option options[] = | 47 | static struct argp_option options[] = |
48 | { | 48 | { |
49 | {NULL, 0, NULL, 0, | ||
50 | "mail.local specific switches", 0}, | ||
49 | { "ex-multiple-delivery-success", ARG_MULTIPLE_DELIVERY, NULL, 0, | 51 | { "ex-multiple-delivery-success", ARG_MULTIPLE_DELIVERY, NULL, 0, |
50 | "Don't return errors when delivering to multiple recipients", 0 }, | 52 | "Don't return errors when delivering to multiple recipients", 0 }, |
51 | { "ex-quota-tempfail", ARG_QUOTA_TEMPFAIL, NULL, 0, | 53 | { "ex-quota-tempfail", ARG_QUOTA_TEMPFAIL, NULL, 0, |
... | @@ -82,10 +84,16 @@ static struct argp argp = { | ... | @@ -82,10 +84,16 @@ static struct argp argp = { |
82 | parse_opt, | 84 | parse_opt, |
83 | args_doc, | 85 | args_doc, |
84 | doc, | 86 | doc, |
85 | mu_common_argp_child, | 87 | NULL, |
86 | NULL, NULL | 88 | NULL, NULL |
87 | }; | 89 | }; |
88 | 90 | ||
91 | static const char *argp_capa[] = { | ||
92 | "mailutils", | ||
93 | "logging", | ||
94 | NULL | ||
95 | }; | ||
96 | |||
89 | char *from = NULL; | 97 | char *from = NULL; |
90 | char *progfile_pattern = NULL; | 98 | char *progfile_pattern = NULL; |
91 | 99 | ||
... | @@ -169,8 +177,8 @@ main (int argc, char *argv[]) | ... | @@ -169,8 +177,8 @@ main (int argc, char *argv[]) |
169 | umask (0077); | 177 | umask (0077); |
170 | 178 | ||
171 | mu_argp_error_code = EX_CONFIG; | 179 | mu_argp_error_code = EX_CONFIG; |
172 | mu_create_argcv (argc, argv, &argc, &argv); | 180 | |
173 | argp_parse (&argp, argc, argv, 0, &arg_index, NULL); | 181 | mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL); |
174 | 182 | ||
175 | openlog ("mail.local", LOG_PID, log_facility); | 183 | openlog ("mail.local", LOG_PID, log_facility); |
176 | mu_error_set_print (mu_syslog_error_printer); | 184 | mu_error_set_print (mu_syslog_error_printer); |
... | @@ -436,6 +444,9 @@ deliver (FILE *fp, char *name) | ... | @@ -436,6 +444,9 @@ deliver (FILE *fp, char *name) |
436 | stream_t stream; | 444 | stream_t stream; |
437 | size_t size; | 445 | size_t size; |
438 | int failed = 0; | 446 | int failed = 0; |
447 | #if defined(USE_DBM) | ||
448 | struct stat sb; | ||
449 | #endif | ||
439 | 450 | ||
440 | pw = mu_getpwnam (name); | 451 | pw = mu_getpwnam (name); |
441 | if (!pw) | 452 | if (!pw) | ... | ... |
-
Please register or sign in to post a comment