From af0c0ed2e17dc421c807b442498b20197a9a524d Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 27 Dec 2001 16:18:23 +0000 Subject: [PATCH] mbtask added outbound types flags --- ChangeLog | 2 ++ mbtask/outstat.c | 25 +++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99916db7..b223f04b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4382,6 +4382,8 @@ v0.33.19 26-Oct-2001 pause timer. Fixed some potential Sparc problems. On new systems, all paths for MBSE are now created in the /opt/mbse root. + When scanning outbound, flags are set if flo or mail pkt files + are present. mbmon: Changed the lastcaller screen to display the External Door diff --git a/mbtask/outstat.c b/mbtask/outstat.c index a54003b9..af5e1453 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -57,20 +57,21 @@ static struct _alist } *alist = NULL; -#define F_NORMAL 1 -#define F_CRASH 2 -#define F_IMM 4 -#define F_HOLD 8 -#define F_FREQ 16 -#define F_POLL 32 - +#define F_NORMAL 0x0001 +#define F_CRASH 0x0002 +#define F_IMM 0x0004 +#define F_HOLD 0x0008 +#define F_FREQ 0x0010 +#define F_POLL 0x0020 +#define F_ISFLO 0x0040 +#define F_ISPKT 0x0080 int outstat() { int rc, first = TRUE; struct _alist *tmp, *old; - char flstr[6]; + char flstr[9]; char temp[81]; tasklog('+', "Scanning outbound"); @@ -91,16 +92,18 @@ int outstat() for (tmp = alist; tmp; tmp = tmp->next) { if (first) { - tasklog('+', "Flavor Size Online Modem ISDN TCP/IP Calls Status Address"); + tasklog('+', "Flavor Size Online Modem ISDN TCP/IP Calls Status Address"); first = FALSE; } - strcpy(flstr,"......"); + strcpy(flstr,"...... .."); if ((tmp->flavors) & F_IMM ) flstr[0]='I'; if ((tmp->flavors) & F_CRASH ) flstr[1]='C'; if ((tmp->flavors) & F_NORMAL) flstr[2]='N'; if ((tmp->flavors) & F_HOLD ) flstr[3]='H'; if ((tmp->flavors) & F_FREQ ) flstr[4]='R'; if ((tmp->flavors) & F_POLL ) flstr[5]='P'; + if ((tmp->flavors) & F_ISPKT ) flstr[7]='M'; + if ((tmp->flavors) & F_ISFLO ) flstr[8]='F'; sprintf(temp, "%s %8lu %08x %08x %08x %08x %5d %6d %s", flstr, (long)tmp->size, (unsigned int)tmp->olflags, (unsigned int)tmp->moflags, @@ -188,6 +191,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname) (*tmp)->time = st.st_mtime; if (isflo == OUT_FLO) { + (*tmp)->flavors |= F_ISFLO; if ((fp = fopen(fname,"r"))) { while (fgets(buf, sizeof(buf) - 1, fp)) { if (*(p = buf + strlen(buf) - 1) == '\n') @@ -236,6 +240,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname) } else if (isflo == OUT_PKT) { (*tmp)->size += st.st_size; + (*tmp)->flavors |= F_ISPKT; } else if (isflo == OUT_REQ) { (*tmp)->flavors |= F_FREQ; } else if (isflo == OUT_POL) {