Fixed outbound scanning on ARM systems

This commit is contained in:
Michiel Broek 2007-09-24 18:44:41 +00:00
parent 38a2bfdd24
commit a438c16e43
3 changed files with 20 additions and 15 deletions

View File

@ -10,13 +10,14 @@ v0.91.11 02-Sep-2007
Added missing record counter when searching GoldED wrong LR Added missing record counter when searching GoldED wrong LR
pointers and forgot to write fixed LR records. pointers and forgot to write fixed LR records.
mbcico:
Fixed outbound scanning on ARM systems.
mbfido: mbfido:
Fixed date conversion in netmail-email gate. Fixed date conversion in netmail-email gate.
mbtask: mbtask:
Added some debug logging to investigate a problem with Fixed outbound scanning on ARM systems.
outbound scanning.
Inserted some extra code to test..
Fixed a variable formatting. Fixed a variable formatting.

View File

@ -4,7 +4,7 @@
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2005 * Copyright (C) 1997-2007
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -55,6 +55,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
DIR *dp = NULL; DIR *dp = NULL;
struct dirent *de; struct dirent *de;
int rc = 0, isflo, fage; int rc = 0, isflo, fage;
unsigned short t_net, t_node, t_point;
Syslog('o' ,"scan_dir \"%s\" (%s)",MBSE_SS(dname),ispoint?"point":"node"); Syslog('o' ,"scan_dir \"%s\" (%s)",MBSE_SS(dname),ispoint?"point":"node");
@ -80,9 +81,11 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2); strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2);
if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) { if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) {
sscanf(de->d_name,"%04x%04x",&addr.net,&addr.node); sscanf(de->d_name,"%04x%04x",&t_net,&t_node);
if ((rc = scan_dir(fn, fname, 1))) addr.net = t_net;
goto exout; addr.node = t_node;
if ((rc = scan_dir(fn, fname, 1)))
goto exout;
} else if ((strcasecmp(de->d_name+8,".out") == 0) || } else if ((strcasecmp(de->d_name+8,".out") == 0) ||
(strcasecmp(de->d_name+8,".cut") == 0) || (strcasecmp(de->d_name+8,".cut") == 0) ||
(strcasecmp(de->d_name+8,".hut") == 0) || (strcasecmp(de->d_name+8,".hut") == 0) ||
@ -99,10 +102,14 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
(strcasecmp(de->d_name+8,".dlo") == 0) || (strcasecmp(de->d_name+8,".dlo") == 0) ||
(strcasecmp(de->d_name+8,".req") == 0) || (strcasecmp(de->d_name+8,".req") == 0) ||
(strcasecmp(de->d_name+8,".pol") == 0)) { (strcasecmp(de->d_name+8,".pol") == 0)) {
if (ispoint) if (ispoint) {
sscanf(de->d_name,"%08x", &addr.point); sscanf(de->d_name,"%08x", &t_point);
else addr.point = t_point;
sscanf(de->d_name,"%04x%04x", &addr.net,&addr.node); } else {
sscanf(de->d_name,"%04x%04x", &t_net,&t_node);
addr.net = t_net;
addr.node = t_node;
}
flavor = tolower(de->d_name[9]); flavor = tolower(de->d_name[9]);
if (flavor == 'f') if (flavor == 'f')
flavor = 'o'; flavor = 'o';

View File

@ -4,7 +4,7 @@
* Purpose ...............: Outbound scanning * Purpose ...............: Outbound scanning
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2005 * Copyright (C) 1997-2007
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -89,7 +89,6 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
sscanf(de->d_name,"%04hx%04hx",&t_net,&t_node); sscanf(de->d_name,"%04hx%04hx",&t_net,&t_node);
addr.net = t_net; addr.net = t_net;
addr.node = t_node; addr.node = t_node;
Syslog('m', "sscanf 1 \"%s\" \"%s\" => %d %d", dname, de->d_name, addr.net, addr.node);
if ((rc = scan_dir(fn, fname, 1))) if ((rc = scan_dir(fn, fname, 1)))
goto exout; goto exout;
} else if ((strcasecmp(de->d_name+8,".out") == 0) || } else if ((strcasecmp(de->d_name+8,".out") == 0) ||
@ -111,12 +110,10 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
if (ispoint) { if (ispoint) {
sscanf(de->d_name,"%08hx", &t_point); sscanf(de->d_name,"%08hx", &t_point);
addr.point = t_point; addr.point = t_point;
Syslog('m', "sscanf 3 \"%s\" \"%s\" => %d %d %d", dname, de->d_name, addr.net, addr.node, addr.point);
} else { } else {
sscanf(de->d_name,"%04hx%04hx", &t_net,&t_node); sscanf(de->d_name,"%04hx%04hx", &t_net,&t_node);
addr.net = t_net; addr.net = t_net;
addr.node = t_node; addr.node = t_node;
Syslog('m', "sscanf 2 \"%s\" \"%s\" => %d %d", dname, de->d_name, addr.net, addr.node);
} }
flavor = tolower(de->d_name[9]); flavor = tolower(de->d_name[9]);
if (flavor == 'f') if (flavor == 'f')