Fixed nodes logging
This commit is contained in:
parent
02e99d131e
commit
fbe81bfa68
@ -78,7 +78,7 @@ int check_calllist(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
Syslog('c', "Removing slot %d node %s from calllist", i, ascfnode(calllist[i].addr, 0x0f));
|
Syslog('c', "Removing slot %d node %s from calllist", i, fido2str(calllist[i].addr, 0x0f));
|
||||||
memset(&calllist[i], 0, sizeof(tocall));
|
memset(&calllist[i], 0, sizeof(tocall));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ int check_calllist(void)
|
|||||||
if (!found) {
|
if (!found) {
|
||||||
for (i = 0; i < MAXTASKS; i++) {
|
for (i = 0; i < MAXTASKS; i++) {
|
||||||
if (!calllist[i].addr.zone) {
|
if (!calllist[i].addr.zone) {
|
||||||
Syslog('c', "Adding %s to calllist slot %d", ascfnode(tmp->addr, 0x1f), i);
|
Syslog('c', "Adding %s to calllist slot %d", fido2str(tmp->addr, 0x1f), i);
|
||||||
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;
|
||||||
@ -142,7 +142,7 @@ int check_calllist(void)
|
|||||||
call_work++;
|
call_work++;
|
||||||
Syslog('c', "%4d %s %5d %3d %s %s %08x %08x %08x %s", i, calllist[i].calling?"true ":"false", calllist[i].taskpid,
|
Syslog('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),
|
||||||
calllist[i].moflags, calllist[i].diflags, calllist[i].ipflags, ascfnode(calllist[i].addr, 0x1f));
|
calllist[i].moflags, calllist[i].diflags, calllist[i].ipflags, fido2str(calllist[i].addr, 0x1f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ int outstat()
|
|||||||
* Here we are out of options, clear callflag.
|
* Here we are out of options, clear callflag.
|
||||||
*/
|
*/
|
||||||
if (tmp->callmode == CM_NONE) {
|
if (tmp->callmode == CM_NONE) {
|
||||||
Syslog('!', "No method to call %s available", ascfnode(tmp->addr, 0x0f));
|
Syslog('!', "No method to call %s available", fido2str(tmp->addr, 0x0f));
|
||||||
tmp->flavors &= ~F_CALL;
|
tmp->flavors &= ~F_CALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -535,7 +535,7 @@ int outstat()
|
|||||||
sprintf(temp, "%s %8s %08x %08x %08x %08x %5d %s %s %s", flstr, size_str(tmp->size),
|
sprintf(temp, "%s %8s %08x %08x %08x %08x %5d %s %s %s", flstr, size_str(tmp->size),
|
||||||
(unsigned int)tmp->olflags, (unsigned int)tmp->moflags,
|
(unsigned int)tmp->olflags, (unsigned int)tmp->moflags,
|
||||||
(unsigned int)tmp->diflags, (unsigned int)tmp->ipflags,
|
(unsigned int)tmp->diflags, (unsigned int)tmp->ipflags,
|
||||||
tmp->cst.tryno, callstatus(tmp->cst.trystat), callmode(tmp->callmode), ascfnode(tmp->addr, 0x0f));
|
tmp->cst.tryno, callstatus(tmp->cst.trystat), callmode(tmp->callmode), fido2str(tmp->addr, 0x0f));
|
||||||
Syslog('+', "%s", temp);
|
Syslog('+', "%s", temp);
|
||||||
|
|
||||||
} /* All nodes scanned. */
|
} /* All nodes scanned. */
|
||||||
@ -591,6 +591,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
|
|||||||
(strcasecmp((*tmp)->addr.domain,addr->domain) == 0)))
|
(strcasecmp((*tmp)->addr.domain,addr->domain) == 0)))
|
||||||
break;
|
break;
|
||||||
if (*tmp == NULL) {
|
if (*tmp == NULL) {
|
||||||
|
Syslog('-', "%s", ascfnode(addr, 0xff));
|
||||||
nlent = getnlent(addr);
|
nlent = getnlent(addr);
|
||||||
*tmp = (struct _alist *)malloc(sizeof(struct _alist));
|
*tmp = (struct _alist *)malloc(sizeof(struct _alist));
|
||||||
(*tmp)->next = NULL;
|
(*tmp)->next = NULL;
|
||||||
|
@ -357,10 +357,32 @@ time_t file_time(char *path)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return ASCII string for node, the bits in 'fl' set the
|
* Return ASCII string for node, the bits in 'fl' set the output format.
|
||||||
* output format.
|
|
||||||
*/
|
*/
|
||||||
char *ascfnode(fidoaddr a, int fl)
|
char *ascfnode(faddr *a, int fl)
|
||||||
|
{
|
||||||
|
static char buf[128];
|
||||||
|
|
||||||
|
buf[0] = '\0';
|
||||||
|
if ((fl & 0x08) && (a->zone))
|
||||||
|
sprintf(buf+strlen(buf),"%u:",a->zone);
|
||||||
|
if (fl & 0x04)
|
||||||
|
sprintf(buf+strlen(buf),"%u/",a->net);
|
||||||
|
if (fl & 0x02)
|
||||||
|
sprintf(buf+strlen(buf),"%u",a->node);
|
||||||
|
if ((fl & 0x01) && (a->point))
|
||||||
|
sprintf(buf+strlen(buf),".%u",a->point);
|
||||||
|
if ((fl & 0x10) && (strlen(a->domain)))
|
||||||
|
sprintf(buf+strlen(buf),"@%s",a->domain);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return ASCII string for node, the bits in 'fl' set the output format.
|
||||||
|
*/
|
||||||
|
char *fido2str(fidoaddr a, int fl)
|
||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
|
|
||||||
@ -378,8 +400,6 @@ char *ascfnode(fidoaddr a, int fl)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *Dos2Unix(char *dosname)
|
char *Dos2Unix(char *dosname)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
@ -34,7 +34,8 @@ int file_exist(char *, int);
|
|||||||
int mkdirs(char *, mode_t);
|
int mkdirs(char *, mode_t);
|
||||||
long file_size(char *);
|
long file_size(char *);
|
||||||
time_t file_time(char *);
|
time_t file_time(char *);
|
||||||
char *ascfnode(fidoaddr, int);
|
char *ascfnode(faddr *, int);
|
||||||
|
char *fido2str(fidoaddr, int);
|
||||||
char *Dos2Unix(char *);
|
char *Dos2Unix(char *);
|
||||||
char *dayname(void);
|
char *dayname(void);
|
||||||
void InitFidonet(void);
|
void InitFidonet(void);
|
||||||
|
Reference in New Issue
Block a user