More AreaMgr/FileMgr fixes
This commit is contained in:
parent
3337479238
commit
8d1969771a
@ -4640,6 +4640,8 @@ v0.33.20 10-Feb-2002
|
||||
Reduced aka match level for (dis)connect areas to zone, net.
|
||||
This should fix problems on systems with multiple aka's when
|
||||
the first aka is not the aka in the areas.
|
||||
In mgr result reports, lines with connected areas do now also
|
||||
display the aka to which they are connected.
|
||||
|
||||
mball:
|
||||
Will not crash anymore when it needs more then 10 minutes to
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: SEEN-BY and PATH lists
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
* Copyright (C) 1997-2002
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -53,10 +53,10 @@ int in_list(faddr *addr, fa_list **fap, int fourd)
|
||||
{
|
||||
fa_list *tmp;
|
||||
|
||||
Syslog('M', "in_list: Seeking seen-by match for %s", ascinode(addr,0x06));
|
||||
|
||||
/*
|
||||
* No seenby check for points
|
||||
*/
|
||||
if (addr->point) {
|
||||
Syslog('M', "in_list: No seen-by check for point address");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -65,11 +65,9 @@ int in_list(faddr *addr, fa_list **fap, int fourd)
|
||||
((!fourd) || (fourd && (tmp->addr->zone == addr->zone))) &&
|
||||
((!fourd) || (fourd && (tmp->addr->point == addr->point))) &&
|
||||
(tmp->addr->node == addr->node)) {
|
||||
Syslog('M', "in_list: Match found");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Syslog('M', "in_list: Match not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -102,7 +100,6 @@ void fill_list(fa_list **fap, char *str, fa_list **omit)
|
||||
else
|
||||
oldnet = ta->net;
|
||||
if (allowskip && omit && *omit && (metric(ta,(*omit)->addr) == 0)) {
|
||||
Syslog('m', "fill_list: omit %s", ascfnode(ta,0x1f));
|
||||
tmp = *omit;
|
||||
*omit = (*omit)->next;
|
||||
tmp->next = NULL;
|
||||
@ -200,8 +197,7 @@ void sort_list(fa_list **fap)
|
||||
i = 1;
|
||||
|
||||
for (ta = *fap; ta; ta = ta->next) {
|
||||
while ((i < n) && (compaddr(&ta,&(vector[i])) == 0))
|
||||
{
|
||||
while ((i < n) && (compaddr(&ta,&(vector[i])) == 0)) {
|
||||
tidy_faddr((vector[i])->addr);
|
||||
free(vector[i]);
|
||||
i++;
|
||||
|
@ -665,7 +665,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
|
||||
}
|
||||
|
||||
b = bestaka_s(t);
|
||||
i = metric(b, fido2faddr(mgroup.UseAka));
|
||||
i = metric(b, fido2faddr(msgs.Aka));
|
||||
Syslog('m', "Aka match level is %d", i);
|
||||
|
||||
if (i >= METRIC_NET) {
|
||||
@ -745,7 +745,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
||||
}
|
||||
|
||||
b = bestaka_s(t);
|
||||
i = metric(b, fido2faddr(mgroup.UseAka));
|
||||
i = metric(b, fido2faddr(msgs.Aka));
|
||||
Syslog('m', "Aka match level is %d", i);
|
||||
|
||||
if (i >= METRIC_NET) {
|
||||
@ -772,7 +772,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
|
||||
*/
|
||||
a_list = TRUE;
|
||||
Syslog('+', "Connected echo area %s", Area);
|
||||
fprintf(tmp, "Connected to area %s\n", Area);
|
||||
fprintf(tmp, "Connected to area %s using aka %s\n", Area, aka2str(msgs.Aka));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -805,7 +805,9 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
||||
}
|
||||
|
||||
f = bestaka_s(t);
|
||||
Syslog('m', "Bestaka for %s is %s", ascfnode(t, 0x1f), ascfnode(f, 0x1f));
|
||||
temp = xstrcpy(ascfnode(t, 0x1f));
|
||||
Syslog('m', "Bestaka for %s is %s", temp, ascfnode(f, 0x1f));
|
||||
free(temp);
|
||||
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||
@ -840,8 +842,9 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
||||
fseek(mp, msgshdr.hdrsize, SEEK_SET);
|
||||
|
||||
while (fread(&msgs, msgshdr.recsize, 1, mp) == 1) {
|
||||
if ((!strcmp(Group, msgs.Group)) && (msgs.Active) && (!msgs.Mandatory) &&
|
||||
(metric(fido2faddr(mgroup.UseAka), f) == METRIC_EQUAL)) {
|
||||
if ((!strcmp(Group, msgs.Group)) && (msgs.Active) && (!msgs.Mandatory) && strlen(msgs.Tag) &&
|
||||
((msgs.Type == ECHOMAIL) || (msgs.Type == NEWS) || (msgs.Type == LIST)) &&
|
||||
(metric(fido2faddr(msgs.Aka), f) < METRIC_NET)) {
|
||||
|
||||
if (Connect) {
|
||||
Link = FALSE;
|
||||
@ -863,7 +866,7 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
||||
fseek(mp, - sizeof(Sys), SEEK_CUR);
|
||||
fwrite(&Sys, sizeof(Sys), 1, mp);
|
||||
Syslog('+', "AreaMgr: Connected %s", msgs.Tag);
|
||||
fprintf(tmp, "Connected area %s\n", msgs.Tag);
|
||||
fprintf(tmp, "Connected area %s using aka %s\n", msgs.Tag, aka2str(msgs.Aka));
|
||||
a_list = TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
|
||||
}
|
||||
|
||||
b = bestaka_s(t);
|
||||
i = metric(b, fido2faddr(fgroup.UseAka));
|
||||
i = metric(b, fido2faddr(tic.Aka));
|
||||
Syslog('m', "Aka match level is %d", i);
|
||||
|
||||
if (i >= METRIC_NET) {
|
||||
@ -627,7 +627,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
||||
}
|
||||
|
||||
b = bestaka_s(t);
|
||||
i = metric(b, fido2faddr(fgroup.UseAka));
|
||||
i = metric(b, fido2faddr(tic.Aka));
|
||||
Syslog('m', "Aka match level is %d", i);
|
||||
|
||||
if (i >= METRIC_NET) {
|
||||
@ -653,7 +653,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
|
||||
*/
|
||||
f_list = TRUE;
|
||||
Syslog('+', "Connected to file area %s", Area);
|
||||
fprintf(tmp, "Connected to area %s\n", Area);
|
||||
fprintf(tmp, "Connected to area %s using aka %s\n", Area, aka2str(tic.Aka));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -719,7 +719,8 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
||||
fseek(fp, tichdr.hdrsize, SEEK_SET);
|
||||
while (fread(&tic, tichdr.recsize, 1, fp) == 1) {
|
||||
|
||||
if ((!strcmp(Group, tic.Group)) && tic.Active && (metric(fido2faddr(fgroup.UseAka), f) == METRIC_EQUAL)) {
|
||||
if ((!strcmp(Group, tic.Group)) && tic.Active && strlen(tic.Name) &&
|
||||
(metric(fido2faddr(tic.Aka), f) < METRIC_NET)) {
|
||||
|
||||
if (Connect) {
|
||||
Link = FALSE;
|
||||
@ -740,7 +741,7 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
|
||||
fseek(fp, - sizeof(Sys), SEEK_CUR);
|
||||
fwrite(&Sys, sizeof(Sys), 1, fp);
|
||||
Syslog('+', "FileMgr: Connected %s", tic.Name);
|
||||
fprintf(tmp, "Connected area %s\n", tic.Name);
|
||||
fprintf(tmp, "Connected area %s using aka %s\n", tic.Name, aka2str(tic.Aka));
|
||||
f_list = TRUE;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user