SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.36
#ifndef lint
#ifdef DAEMON
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.35 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.36 (Berkeley) %G% (with daemon mode)";
-static char sccsid[] = "@(#)daemon.c 8.35 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.36 (Berkeley) %G% (without daemon mode)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
register STAB *s;
char hbuf[MAXNAME];
extern struct hostent *gethostbyaddr();
register STAB *s;
char hbuf[MAXNAME];
extern struct hostent *gethostbyaddr();
/*
** See if we have already looked up this name. If so, just
/*
** See if we have already looked up this name. If so, just
printf("host_map_lookup(%s) => CACHE %s\n",
name, s->s_namecanon.nc_cname);
errno = s->s_namecanon.nc_errno;
printf("host_map_lookup(%s) => CACHE %s\n",
name, s->s_namecanon.nc_cname);
errno = s->s_namecanon.nc_errno;
h_errno = s->s_namecanon.nc_herrno;
h_errno = s->s_namecanon.nc_herrno;
*statp = s->s_namecanon.nc_stat;
if (CurEnv->e_message == NULL && *statp == EX_TEMPFAIL)
{
*statp = s->s_namecanon.nc_stat;
if (CurEnv->e_message == NULL && *statp == EX_TEMPFAIL)
{
{
register struct hostent *hp;
{
register struct hostent *hp;
- if (tTd(9, 1))
- printf("FAIL (%d)\n", h_errno);
s->s_namecanon.nc_errno = errno;
s->s_namecanon.nc_errno = errno;
s->s_namecanon.nc_herrno = h_errno;
s->s_namecanon.nc_herrno = h_errno;
+ if (tTd(9, 1))
+ printf("FAIL (%d)\n", h_errno);
switch (h_errno)
{
case TRY_AGAIN:
switch (h_errno)
{
case TRY_AGAIN:
*statp = EX_UNAVAILABLE;
break;
}
*statp = EX_UNAVAILABLE;
break;
}
+#else
+ if (tTd(9, 1))
+ printf("FAIL\n");
+ *statp = EX_NOHOST;
+#endif
s->s_namecanon.nc_stat = *statp;
if (*statp != EX_TEMPFAIL || UseNameServer)
return NULL;
s->s_namecanon.nc_stat = *statp;
if (*statp != EX_TEMPFAIL || UseNameServer)
return NULL;
/* nope -- ask the name server */
hp = gethostbyaddr((char *)&in_addr, sizeof(struct in_addr), AF_INET);
s->s_namecanon.nc_errno = errno;
/* nope -- ask the name server */
hp = gethostbyaddr((char *)&in_addr, sizeof(struct in_addr), AF_INET);
s->s_namecanon.nc_errno = errno;
s->s_namecanon.nc_herrno = h_errno;
s->s_namecanon.nc_herrno = h_errno;
s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */
if (hp == NULL)
{
s->s_namecanon.nc_flags |= NCF_VALID; /* will be soon */
if (hp == NULL)
{