summaryrefslogtreecommitdiff
path: root/common/smtppass.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-03 02:53:40 +0000
committerStef Walter <stef@memberwebs.com>2004-09-03 02:53:40 +0000
commitd3f53b134170a48d55b78f75999ddd19a9282f2d (patch)
tree3fd97ec76ad95488a5fa4211727ff69ae250ceaf /common/smtppass.c
parenta6e0583b04873a0643430988d4071ef972c3d813 (diff)
- Fixes to configuration file stuff
Diffstat (limited to 'common/smtppass.c')
-rw-r--r--common/smtppass.c10
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;
}