freebsd-ports/mail/dbmail/files/patch-2.0.7_006_281
Edwin Groothuis 74c04e9e79 [update] mail/dbmail: sync to svn
1. #281 - fix compilation on FreeBSD 4.x

PR:		ports/90914
Submitted by:	Mark Starovoytov <mark_sf@kikg.ifmo.ru>
2005-12-26 09:55:52 +00:00

52 lines
1.7 KiB
Text

--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}