bugfixes for internet nodes on hold

This commit is contained in:
Michiel Broek 2001-12-30 15:53:01 +00:00
parent e510871928
commit 80cd689c19
4 changed files with 35 additions and 22 deletions

View File

@ -481,7 +481,8 @@ int check_calllist(void)
found = FALSE; found = FALSE;
for (tmp = alist; tmp; tmp = tmp->next) { for (tmp = alist; tmp; tmp = tmp->next) {
if ((calllist[i].addr.zone == tmp->addr.zone) && (calllist[i].addr.net == tmp->addr.net) && 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; found = TRUE;
} }
} }
@ -511,6 +512,9 @@ int check_calllist(void)
calllist[i].addr = tmp->addr; calllist[i].addr = tmp->addr;
calllist[i].cst = tmp->cst; calllist[i].cst = tmp->cst;
calllist[i].callmode = tmp->callmode; calllist[i].callmode = tmp->callmode;
calllist[i].moflags = tmp->moflags;
calllist[i].diflags = tmp->diflags;
calllist[i].ipflags = tmp->ipflags;
break; break;
} }
} }
@ -527,13 +531,13 @@ int check_calllist(void)
for (i = 0; i < MAXTASKS; i++) { for (i = 0; i < MAXTASKS; i++) {
if (calllist[i].addr.zone) { if (calllist[i].addr.zone) {
if (!call_work) { if (!call_work) {
tasklog('c', "Slot Call Pid Try Status Mode Address"); tasklog('c', "Slot Call Pid Try Status Mode Modem ISDN TCP/IP Address");
tasklog('c', "---- ----- ----- --- ------- ------- ----------------"); tasklog('c', "---- ----- ----- --- ------- ------- -------- -------- -------- ----------------");
} }
call_work++; 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), 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));
} }
} }

View File

@ -28,6 +28,9 @@ typedef struct _tocall {
callstat cst; /* Last call status */ callstat cst; /* Last call status */
int calling; /* Is calling */ int calling; /* Is calling */
pid_t taskpid; /* Task pid number */ pid_t taskpid; /* Task pid number */
unsigned long moflags; /* Modem flags */
unsigned long diflags; /* ISDN flags */
unsigned long ipflags; /* TCP/IP flags */
} tocall; } tocall;

View File

@ -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, int);
void set_next(int hour, int min) 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 * If the node has internet and we have internet available, check if we can send
* immediatly. * 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; tmp->flavors |= F_CALL;
} }
if ((tmp->flavors) & F_IMM ) { if ((tmp->flavors) & F_IMM ) {

View File

@ -40,6 +40,21 @@ typedef struct _pp_list {
} 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 _ttyinfohdr ttyinfohdr; /* TTY lines */
struct _ttyinfo ttyinfo; struct _ttyinfo ttyinfo;