aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/bi_dns.m42
-rw-r--r--src/engine.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b02def2..1b47ade2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2007-04-17 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * src/engine.c (mailfromd_daemon): Do not call
+ mu_daemon_remove_pidfile, this results in a
+ duplicate free at exit (compensate for mailutils bug)
+ Issue informational messages on program startup and shutdown.
+ * src/bi_dns.m4 (getmx): Fix iteration over mxbuf
+
2007-04-16 Sergey Poznyakoff <gray@gnu.org.ua>
* src/mu_dbm.c, src/mu_dbm.h, src/engine.c, src/main.c: Fix
Berkeley DB locking.
* gacopyz/gacopyz.c (shan_connect): Fix packet length
diff --git a/src/bi_dns.m4 b/src/bi_dns.m4
index a2639a2b..96f9d36e 100644
--- a/src/bi_dns.m4
+++ b/src/bi_dns.m4
@@ -81,13 +81,13 @@ MF_DEFUN(getmx, STRING, STRING domain, OPTIONAL, NUMBER resolve)
int i;
size_t ns;
char *p;
MF_BEGIN_TEMP_SPACE(s, size);
- for (i = 0, ns = 0, p = s; mxbuf[i]; i++) {
+ for (i = 0, ns = 0, p = s; i < MAXMXCOUNT && mxbuf[i]; i++) {
size_t len = strlen(mxbuf[i]);
if (ns + len + 1 > size)
break;
if (i > 0)
*p++ = ' ';
memcpy(p, mxbuf[i], len);
diff --git a/src/engine.c b/src/engine.c
index 5548dd87..c9c5d0da 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -1253,12 +1253,14 @@ sig_stop(int sig)
void
mailfromd_daemon()
{
int rc;
+ mu_error("mailfromd version %s starting", PACKAGE_VERSION);
+
priv_setup();
if (!foreground)
check_pidfile(pidfile);
check_portspec(portspec);
@@ -1283,17 +1285,16 @@ mailfromd_daemon()
mu_strerror(errno));
exit(EX_OSERR);
}
umask(0117);
mu_daemon_create_pidfile(pidfile);
rc = smfi_main();
- mu_error("OK. REMOVING PIDFILE");
- mu_daemon_remove_pidfile();
} else {
umask(0117);
rc = smfi_main();
mu_error("smfi_main failed: rc=%d errno=%s",
rc, strerror (errno));
}
+ mu_error("mailfromd terminating");
exit(rc);
}

Return to:

Send suggestions and report system problems to the System administrator.