mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-09 20:40:13 -04:00
144 lines
4.0 KiB
Plaintext
144 lines
4.0 KiB
Plaintext
$NetBSD: patch-ac,v 1.1 2006/07/23 15:00:41 taca Exp $
|
|
|
|
--- address.c.orig 2002-01-20 23:19:42.000000000 +0900
|
|
+++ address.c
|
|
@@ -42,6 +42,8 @@
|
|
# include "extern.h"
|
|
# include "smtp.h"
|
|
|
|
+static void dnsstatus P((struct recipient *, int, char *));
|
|
+
|
|
int
|
|
addmyalias(name)
|
|
char *name;
|
|
@@ -58,12 +60,12 @@
|
|
ha = (struct hostalias *)MALLOC(sizeof(struct hostalias));
|
|
if (ha == NULL)
|
|
{
|
|
- log(LOG_NOTICE, "out of memory (addmyalias)");
|
|
+ mylog(LOG_NOTICE, "out of memory (addmyalias)");
|
|
return -1;
|
|
}
|
|
/* bzero(ha, sizeof(struct hostalias)); */
|
|
if (cnf.debug & DEBUG_ADDRESS)
|
|
- log(LOG_DEBUG, "adding alias: %s", name);
|
|
+ mylog(LOG_DEBUG, "adding alias: %s", name);
|
|
len = strlen(name);
|
|
/* strip trailing dot */
|
|
while (len > 0 && name[len-1] == '.')
|
|
@@ -114,7 +116,7 @@
|
|
hostp = (struct host *)MALLOC(sizeof(struct host));
|
|
if (hostp == NULL)
|
|
{
|
|
- log(LOG_NOTICE,
|
|
+ mylog(LOG_NOTICE,
|
|
"out of memory (addinetaddress)");
|
|
return -1;
|
|
}
|
|
@@ -153,7 +155,7 @@
|
|
if (addr == NULL) /* just link from mxp */
|
|
{
|
|
if (cnf.debug & DEBUG_ADDRESS)
|
|
- log(LOG_DEBUG, "address info for %s linked", mxp->name);
|
|
+ mylog(LOG_DEBUG, "address info for %s linked", mxp->name);
|
|
return 0;
|
|
}
|
|
|
|
@@ -170,13 +172,13 @@
|
|
{
|
|
case AF_INET:
|
|
bcopy(addr, &sin, sizeof(sin));
|
|
- log(LOG_INFO, "got new address %s for %s, state reset",
|
|
+ mylog(LOG_INFO, "got new address %s for %s, state reset",
|
|
inet_ntoa(sin), mxp->name);
|
|
break;
|
|
#if INET6
|
|
case AF_INET6:
|
|
inet_ntop(AF_INET6, addr, buf, sizeof(buf));
|
|
- log(LOG_INFO, "got new address %s for %s, state reset",
|
|
+ mylog(LOG_INFO, "got new address %s for %s, state reset",
|
|
buf, mxp->name);
|
|
|
|
break;
|
|
@@ -193,19 +195,19 @@
|
|
{
|
|
case AF_INET:
|
|
bcopy(addr, &sin, sizeof(sin));
|
|
- log(LOG_DEBUG, "DNS: registering %s=%s",
|
|
+ mylog(LOG_DEBUG, "DNS: registering %s=%s",
|
|
mxp->name, inet_ntoa(sin));
|
|
break;
|
|
#if INET6
|
|
case AF_INET6:
|
|
inet_ntop(AF_INET6, addr, buf, sizeof(buf));
|
|
- log(LOG_DEBUG, "DNS: registering %s=%s",
|
|
+ mylog(LOG_DEBUG, "DNS: registering %s=%s",
|
|
mxp->name, buf);
|
|
|
|
break;
|
|
#endif
|
|
default:
|
|
- log(LOG_NOTICE,
|
|
+ mylog(LOG_NOTICE,
|
|
"DNS: invalid inet_domain %d at addinetaddress",
|
|
inet_domain);
|
|
}
|
|
@@ -226,7 +228,7 @@
|
|
iap = (struct inetaddr *)MALLOC(sizeof(struct inetaddr));
|
|
if (iap == NULL)
|
|
{
|
|
- log(LOG_NOTICE, "out of memory (addinetaddress)");
|
|
+ mylog(LOG_NOTICE, "out of memory (addinetaddress)");
|
|
return -1;
|
|
}
|
|
bzero(iap, sizeof(struct inetaddr));
|
|
@@ -235,7 +237,7 @@
|
|
iap->address = (char *)MALLOC(len);
|
|
if (iap->address == NULL)
|
|
{
|
|
- log(LOG_NOTICE, "out of memory (addinetaddress)");
|
|
+ mylog(LOG_NOTICE, "out of memory (addinetaddress)");
|
|
return -1;
|
|
}
|
|
bcopy(addr, iap->address, len);
|
|
@@ -462,12 +464,12 @@
|
|
struct domain *d, **hashp;
|
|
|
|
if (cnf.debug & DEBUG_LMTP)
|
|
- log(LOG_DEBUG, "RCPT TO: %s notify=%s orcpt=%s", addr,
|
|
+ mylog(LOG_DEBUG, "RCPT TO: %s notify=%s orcpt=%s", addr,
|
|
(notify == NULL)?"":notify, (orcpt == NULL)?"":orcpt);
|
|
rcpt = (struct recipient *)MALLOC(sizeof(struct recipient));
|
|
if (rcpt == NULL)
|
|
{
|
|
- log(LOG_NOTICE, "out of memory (addrecipient)");
|
|
+ mylog(LOG_NOTICE, "out of memory (addrecipient)");
|
|
return -1;
|
|
}
|
|
bzero(rcpt, sizeof(struct recipient));
|
|
@@ -493,7 +495,7 @@
|
|
if (d == NULL)
|
|
{
|
|
if (cnf.debug & DEBUG_LMTP)
|
|
- log(LOG_DEBUG, "new domain: %s", domain);
|
|
+ mylog(LOG_DEBUG, "new domain: %s", domain);
|
|
rcpt->domain = (struct domain *)MALLOC(sizeof(struct domain));
|
|
bzero(rcpt->domain, sizeof(struct domain));
|
|
rcpt->domain->name = newstr(domain);
|
|
@@ -540,13 +542,13 @@
|
|
return 0;
|
|
}
|
|
|
|
-void
|
|
+static void
|
|
dnsstatus(rcpt, rcode, response)
|
|
struct recipient *rcpt;
|
|
int rcode;
|
|
char *response;
|
|
{
|
|
- log(LOG_INFO, "(%d+%d+%d+%d/%d) relay=%s to=%s proto=%s delay=%d code=%d (%s)",
|
|
+ mylog(LOG_INFO, "(%d+%d+%d+%d/%d) relay=%s to=%s proto=%s delay=%d code=%d (%s)",
|
|
sti.nsent, sti.ndeferred, sti.nnsfailed,
|
|
sti.nsmtpfailed, sti.nrcpt, "unknown",
|
|
rcpt->address, "unknown", 0, rcode,
|