SCCS-vsn: usr.sbin/sendmail/src/main.c 6.57
SCCS-vsn: usr.sbin/sendmail/src/err.c 6.13
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 6.40
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 6.26
SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.45
SCCS-vsn: usr.sbin/sendmail/src/mci.c 6.9
-static char sccsid[] = "@(#)conf.c 6.44 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 6.45 (Berkeley) %G%";
#endif /* not lint */
# include <sys/ioctl.h>
#endif /* not lint */
# include <sys/ioctl.h>
bool
refuseconnections()
{
bool
refuseconnections()
{
+#ifdef XLA
+ if (!xla_smtp_ok())
+ return TRUE;
+#endif
+
/* this is probably too simplistic */
return (CurrentLA >= RefuseLA);
}
/* this is probably too simplistic */
return (CurrentLA >= RefuseLA);
}
#ifndef lint
#ifdef DAEMON
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 6.39 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 6.40 (Berkeley) %G% (with daemon mode)";
-static char sccsid[] = "@(#)daemon.c 6.39 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 6.40 (Berkeley) %G% (without daemon mode)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
** Try to actually open the connection.
*/
** Try to actually open the connection.
*/
+#ifdef XLA
+ /* if too many connections, don't bother trying */
+ if (!xla_noqueue_ok(host))
+ return EX_TEMPFAIL;
+#endif
+
for (;;)
{
if (tTd(16, 1))
for (;;)
{
if (tTd(16, 1))
extern char *errstring();
message("%s", errstring(sav_errno));
extern char *errstring();
message("%s", errstring(sav_errno));
+#ifdef XLA
+ xla_host_end(host);
+#endif
return (EX_UNAVAILABLE);
}
}
return (EX_UNAVAILABLE);
}
}
-static char sccsid[] = "@(#)err.c 6.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)err.c 6.13 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
&MsgBuf[4]);
# endif /* LOG */
if (panic)
&MsgBuf[4]);
# endif /* LOG */
if (panic)
+ {
+#ifdef XLA
+ xla_all_end();
+#endif
errno = 0;
if (QuickAbort)
longjmp(TopFrame, 2);
errno = 0;
if (QuickAbort)
longjmp(TopFrame, 2);
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 6.56 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 6.57 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
strcat(dtype, "+debugging");
syslog(LOG_INFO, "starting daemon: %s", dtype + 1);
strcat(dtype, "+debugging");
syslog(LOG_INFO, "starting daemon: %s", dtype + 1);
+#ifdef XLA
+ xla_create_file();
+#endif
# ifdef QUEUE
if (queuemode)
# ifdef QUEUE
if (queuemode)
getrequests();
/* at this point we are in a child: reset state */
getrequests();
/* at this point we are in a child: reset state */
(void) newenvelope(CurEnv, CurEnv);
/*
(void) newenvelope(CurEnv, CurEnv);
/*
/* post statistics */
poststats(StatFile);
/* post statistics */
poststats(StatFile);
+# ifdef XLA
+ /* clean up extended load average stuff */
+ xla_all_end();
+# endif
+
/* and exit */
# ifdef LOG
if (LogLevel > 78)
/* and exit */
# ifdef LOG
if (LogLevel > 78)
{
FileName = NULL;
unlockqueue(CurEnv);
{
FileName = NULL;
unlockqueue(CurEnv);
+#ifdef XLA
+ xla_all_end();
+#endif
-static char sccsid[] = "@(#)mci.c 6.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)mci.c 6.9 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
/* only uses the envelope to flush the transcript file */
if (mci->mci_state != MCIS_CLOSED)
smtpquit(mci->mci_mailer, mci, &BlankEnvelope);
/* only uses the envelope to flush the transcript file */
if (mci->mci_state != MCIS_CLOSED)
smtpquit(mci->mci_mailer, mci, &BlankEnvelope);
+#ifdef XLA
+ xla_host_end(mci->mci_host);
+#endif
-static char sccsid[] = "@(#)readcf.c 6.25 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c 6.26 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
+#ifdef XLA
+ case 'L': /* extended load average description */
+ xla_init(&bp[1]);
+ break;
+#endif
+
case 'M': /* define mailer */
makemailer(&buf[1]);
break;
case 'M': /* define mailer */
makemailer(&buf[1]);
break;