mbtask added outbound types flags

This commit is contained in:
Michiel Broek 2001-12-27 16:18:23 +00:00
parent dabde30a5e
commit af0c0ed2e1
2 changed files with 17 additions and 10 deletions

View File

@ -4382,6 +4382,8 @@ v0.33.19 26-Oct-2001
pause timer. Fixed some potential Sparc problems. pause timer. Fixed some potential Sparc problems.
On new systems, all paths for MBSE are now created in the On new systems, all paths for MBSE are now created in the
/opt/mbse root. /opt/mbse root.
When scanning outbound, flags are set if flo or mail pkt files
are present.
mbmon: mbmon:
Changed the lastcaller screen to display the External Door Changed the lastcaller screen to display the External Door

View File

@ -57,20 +57,21 @@ static struct _alist
} *alist = NULL; } *alist = NULL;
#define F_NORMAL 1 #define F_NORMAL 0x0001
#define F_CRASH 2 #define F_CRASH 0x0002
#define F_IMM 4 #define F_IMM 0x0004
#define F_HOLD 8 #define F_HOLD 0x0008
#define F_FREQ 16 #define F_FREQ 0x0010
#define F_POLL 32 #define F_POLL 0x0020
#define F_ISFLO 0x0040
#define F_ISPKT 0x0080
int outstat() int outstat()
{ {
int rc, first = TRUE; int rc, first = TRUE;
struct _alist *tmp, *old; struct _alist *tmp, *old;
char flstr[6]; char flstr[9];
char temp[81]; char temp[81];
tasklog('+', "Scanning outbound"); tasklog('+', "Scanning outbound");
@ -94,13 +95,15 @@ int outstat()
tasklog('+', "Flavor Size Online Modem ISDN TCP/IP Calls Status Address"); tasklog('+', "Flavor Size Online Modem ISDN TCP/IP Calls Status Address");
first = FALSE; first = FALSE;
} }
strcpy(flstr,"......"); strcpy(flstr,"...... ..");
if ((tmp->flavors) & F_IMM ) flstr[0]='I'; if ((tmp->flavors) & F_IMM ) flstr[0]='I';
if ((tmp->flavors) & F_CRASH ) flstr[1]='C'; if ((tmp->flavors) & F_CRASH ) flstr[1]='C';
if ((tmp->flavors) & F_NORMAL) flstr[2]='N'; if ((tmp->flavors) & F_NORMAL) flstr[2]='N';
if ((tmp->flavors) & F_HOLD ) flstr[3]='H'; if ((tmp->flavors) & F_HOLD ) flstr[3]='H';
if ((tmp->flavors) & F_FREQ ) flstr[4]='R'; if ((tmp->flavors) & F_FREQ ) flstr[4]='R';
if ((tmp->flavors) & F_POLL ) flstr[5]='P'; 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, sprintf(temp, "%s %8lu %08x %08x %08x %08x %5d %6d %s", flstr, (long)tmp->size,
(unsigned int)tmp->olflags, (unsigned int)tmp->moflags, (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; (*tmp)->time = st.st_mtime;
if (isflo == OUT_FLO) { if (isflo == OUT_FLO) {
(*tmp)->flavors |= F_ISFLO;
if ((fp = fopen(fname,"r"))) { if ((fp = fopen(fname,"r"))) {
while (fgets(buf, sizeof(buf) - 1, fp)) { while (fgets(buf, sizeof(buf) - 1, fp)) {
if (*(p = buf + strlen(buf) - 1) == '\n') 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) { } else if (isflo == OUT_PKT) {
(*tmp)->size += st.st_size; (*tmp)->size += st.st_size;
(*tmp)->flavors |= F_ISPKT;
} else if (isflo == OUT_REQ) { } else if (isflo == OUT_REQ) {
(*tmp)->flavors |= F_FREQ; (*tmp)->flavors |= F_FREQ;
} else if (isflo == OUT_POL) { } else if (isflo == OUT_POL) {