Serveral fixes and updates

This commit is contained in:
Michiel Broek 2003-01-11 12:14:04 +00:00
parent 27ae851cf5
commit e63a3b2bf5
4 changed files with 64 additions and 49 deletions

View File

@ -19,9 +19,9 @@ v0.37.00 26-Dec-2002.
only call binkp nodes.
general:
A new developer joined the team, David Gonzalez.
A new developer/translator joined the team, David Gonzalez.
The settings to suppres some IP protocols (global and nodes)
are removed, this behaviour can be set using nodelist flags
are removed, this behaviour must be set using nodelist flags
configuration.
Debug logging for mail and news now have one setting, the M.
Nodelist debug logging now uses the N character.
@ -56,6 +56,15 @@ v0.37.00 26-Dec-2002.
Echomail from other zones showed the address of your own zone.
Added logging when other errors are found.
At zonegates, the seenby lines were twice stripped.
Another patch to compensate for sysops that pack pascalnet
files in fidonet packets and send these messages into the world
without zone information.
Made the incoming tic files complete case insensitive, mixed
case is now processed. If such file is received, the LFN will
be set to that name.
mbsebbs:
Changed to use the new nodelist lookup methods.
mbsetup:
Removed global flags No-IBN, IFC and ITN from the setup.

View File

@ -82,9 +82,9 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
time_t now;
struct tm *tm;
Syslog('M', "Post netmail from: %s", ascfnode(f, 0xff));
Syslog('M', "Post netmail to : %s", ascfnode(t, 0xff));
Syslog('M', "Post netmail subj: %s", MBSE_SS(subject));
Syslog('m', "Post netmail from: %s", ascfnode(f, 0xff));
Syslog('m', "Post netmail to : %s", ascfnode(t, 0xff));
Syslog('m', "Post netmail subj: %s", MBSE_SS(subject));
net_in++;
/*
@ -107,6 +107,22 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
Syslog('m', "Setting pointinfo (%d) from MSGID", ta->point);
fmpt = f->point = ta->point;
}
if ((ta->net == f->net) && (ta->node == f->node) && (f->zone == 0)) {
/*
* Missing zone info, maybe later we will see a INTL kludge or so, but for
* now, just in case we fix it. And we need that for some Aka collecting
* sysop who doesn't know how to configure his system right.
*/
Syslog('m', "No from zone set, setting zone %d from MSGID", ta->zone);
f->zone = ta->zone;
/*
* 99.9 % chance that the destination zone is also missing.
*/
if (t->zone == 0) {
t->zone = ta->zone;
Syslog('m', "No dest zone set, setting zone %d from MSGID", ta->zone);
}
}
tidy_faddr(ta);
}
}

View File

@ -168,6 +168,8 @@ int LoadTic(char *inb, char *tfn)
char *Temp, *Temp2, *Buf, *Log = NULL, RealName[256];
int i, j, rc, bufsize, DescCnt = FALSE;
fa_list *sbl = NULL;
DIR *dp;
struct dirent *de;
if (CFG.slow_util && do_quiet)
usleep(1);
@ -425,47 +427,27 @@ int LoadTic(char *inb, char *tfn)
* Find out what the real name of the file is,
* most likely this is a 8.3 filename.
*/
sprintf(Temp2, "%s", TIC.TicIn.File);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
} else {
tu(Temp2);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
} else {
tl(Temp2);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
if ((dp = opendir(TIC.Inbound)) == NULL) {
WriteError("$Can't opendir(%s)", TIC.Inbound);
return 1;
}
}
}
while ((de = readdir(dp))) {
/*
* If the above didn't find the file and we got a LFN
* the search again.
* Check 8.3 FN
*/
if (strlen(TIC.TicIn.FullName) && (strlen(RealName) == 0)) {
sprintf(Temp2, "%s", TIC.TicIn.FullName);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
} else {
tu(Temp2);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
} else {
tl(Temp2);
sprintf(Temp, "%s/%s", TIC.Inbound, Temp2);
if (file_exist(Temp, R_OK) == 0) {
strcpy(RealName, Temp2);
}
}
if (strcasecmp(de->d_name, TIC.TicIn.File) == 0) {
strncpy(RealName, de->d_name, 255);
break;
}
/*
* Check LFN
*/
if (strcasecmp(de->d_name, TIC.TicIn.FullName) == 0) {
strncpy(RealName, de->d_name, 255);
break;
}
}
closedir(dp);
}
if (strlen(RealName) == 0) {
@ -476,6 +458,14 @@ int LoadTic(char *inb, char *tfn)
TIC.Orphaned = TRUE;
WriteError("Can't find file in inbound");
} else {
/*
* If no LFN received in the ticfile and the file in the inbound is the same as the 8.3 name
* but only the case is different, then treat the real filename as LFN.
*/
if ((strlen(TIC.TicIn.FullName) == 0) && strcmp(TIC.TicIn.File, RealName) && (strcasecmp(TIC.TicIn.File, RealName) == 0)) {
Syslog('f', "Real filename possible LFN, faking it");
strcpy(TIC.TicIn.FullName, RealName);
}
Syslog('f', "Real filename in inbound is \"%s\"", RealName);
Syslog('+', "8.3 name \"%s\", LFN \"%s\"", TIC.TicIn.File, TIC.TicIn.FullName);
if (strcmp(RealName, TIC.TicIn.File)) {

View File

@ -196,11 +196,11 @@ int Crash_Option(faddr *Dest)
if (exitinfo.Security.level < CFG.iCrashLevel)
return 0;
cmmask = getCMmask();
point = Dest->point;
Dest->point = 0;
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
cmmask = getCMmask();
if (Nlent->oflags & cmmask) {
/* Crash [y/N]: */
pout(CYAN, BLACK, (char *)Language(461));