diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-03 02:53:40 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-03 02:53:40 +0000 |
commit | 6a250c8a1e581287d7ff3c88582ab337e21ac50f (patch) | |
tree | 584a5248e32636a91a1b025c5ab9d06f1ab03273 /common | |
parent | f3fc5aba203b54af1caceee87996873ef62f68cb (diff) |
- Fixes to configuration file stuff
Diffstat (limited to 'common')
-rw-r--r-- | common/smtppass.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index a9e8f9d..e985fa3 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) clstate_init(&g_state); /* Parse the arguments nicely */ - while((ch = getopt(argc, argv, "bc:d:D:h:l:m:p:qt:v")) != -1) + while((ch = getopt(argc, argv, "bc:d:D:f:h:l:m:p:qt:v")) != -1) { switch(ch) { @@ -267,7 +267,7 @@ int main(int argc, char* argv[]) } } - if(warnargs); + if(warnargs) warnx("please use configuration file instead of command-line flags: %s", configfile); argc -= optind; @@ -357,9 +357,13 @@ int main(int argc, char* argv[]) if(g_state.pidfile) pid_file(0); - clstate_cleanup(&g_state); messagex(NULL, LOG_DEBUG, "stopped"); + /* + * We have to do this at the very end because even printing + * messages requires that g_state is valid. + */ + clstate_cleanup(&g_state); return 0; } |