From 80cd689c191f943fec7a8b4bc3e4eca968d124fd Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 30 Dec 2001 15:53:01 +0000 Subject: [PATCH] bugfixes for internet nodes on hold --- mbtask/mbtask.c | 14 +++++++++----- mbtask/mbtask.h | 13 ++++++++----- mbtask/outstat.c | 15 +++------------ mbtask/outstat.h | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 36dd5c56..1da85f86 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -481,7 +481,8 @@ int check_calllist(void) found = FALSE; for (tmp = alist; tmp; tmp = tmp->next) { if ((calllist[i].addr.zone == tmp->addr.zone) && (calllist[i].addr.net == tmp->addr.net) && - (calllist[i].addr.node == tmp->addr.node) && (calllist[i].addr.point == tmp->addr.point)) { + (calllist[i].addr.node == tmp->addr.node) && (calllist[i].addr.point == tmp->addr.point) && + ((tmp->flavors) & F_CALL)) { found = TRUE; } } @@ -511,6 +512,9 @@ int check_calllist(void) calllist[i].addr = tmp->addr; calllist[i].cst = tmp->cst; calllist[i].callmode = tmp->callmode; + calllist[i].moflags = tmp->moflags; + calllist[i].diflags = tmp->diflags; + calllist[i].ipflags = tmp->ipflags; break; } } @@ -527,13 +531,13 @@ int check_calllist(void) for (i = 0; i < MAXTASKS; i++) { if (calllist[i].addr.zone) { if (!call_work) { - tasklog('c', "Slot Call Pid Try Status Mode Address"); - tasklog('c', "---- ----- ----- --- ------- ------- ----------------"); + tasklog('c', "Slot Call Pid Try Status Mode Modem ISDN TCP/IP Address"); + tasklog('c', "---- ----- ----- --- ------- ------- -------- -------- -------- ----------------"); } call_work++; - tasklog('c', "%4d %s %5d %3d %s %s %s", i, calllist[i].calling?"true ":"false", calllist[i].taskpid, + tasklog('c', "%4d %s %5d %3d %s %s %08x %08x %08x %s", i, calllist[i].calling?"true ":"false", calllist[i].taskpid, calllist[i].cst.tryno, callstatus(calllist[i].cst.trystat), callmode(calllist[i].callmode), - ascfnode(calllist[i].addr, 0x1f)); + calllist[i].moflags, calllist[i].diflags, calllist[i].ipflags, ascfnode(calllist[i].addr, 0x1f)); } } diff --git a/mbtask/mbtask.h b/mbtask/mbtask.h index d36fb2d4..83255dd5 100644 --- a/mbtask/mbtask.h +++ b/mbtask/mbtask.h @@ -23,11 +23,14 @@ typedef struct _onetask { * Callist */ typedef struct _tocall { - fidoaddr addr; /* Address to call */ - int callmode; /* Method to use */ - callstat cst; /* Last call status */ - int calling; /* Is calling */ - pid_t taskpid; /* Task pid number */ + fidoaddr addr; /* Address to call */ + int callmode; /* Method to use */ + callstat cst; /* Last call status */ + int calling; /* Is calling */ + pid_t taskpid; /* Task pid number */ + unsigned long moflags; /* Modem flags */ + unsigned long diflags; /* ISDN flags */ + unsigned long ipflags; /* TCP/IP flags */ } tocall; diff --git a/mbtask/outstat.c b/mbtask/outstat.c index 77a546a6..ecf0a93a 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -53,17 +53,6 @@ _alist_l *alist = NULL; /* Nodes to call list */ -#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 -#define F_CALL 0x0100 - - void set_next(int, int); void set_next(int hour, int min) { @@ -253,7 +242,9 @@ int outstat() * If the node has internet and we have internet available, check if we can send * immediatly. */ - if (internet && TCFG.max_tcp && ((tmp->ipflags & IP_IBN) || (tmp->ipflags & IP_IFC) || (tmp->ipflags & IP_ITN))) { + if (internet && TCFG.max_tcp && + (((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) && + ((tmp->ipflags & IP_IBN) || (tmp->ipflags & IP_IFC) || (tmp->ipflags & IP_ITN))) { tmp->flavors |= F_CALL; } if ((tmp->flavors) & F_IMM ) { diff --git a/mbtask/outstat.h b/mbtask/outstat.h index 1edde121..fb782006 100644 --- a/mbtask/outstat.h +++ b/mbtask/outstat.h @@ -40,6 +40,21 @@ typedef struct _pp_list { } pp_list; +/* + * Bitmasks for calling status + */ +#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 +#define F_CALL 0x0100 + + + struct _ttyinfohdr ttyinfohdr; /* TTY lines */ struct _ttyinfo ttyinfo;