Added safety for toplevel areamgr systems

This commit is contained in:
Michiel Broek
2002-05-12 17:59:55 +00:00
parent 57a3751b32
commit 49dbc82685
5 changed files with 28 additions and 10 deletions

View File

@@ -641,7 +641,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
while ((fread(&mgroup, mgrouphdr.recsize, 1, gp)) == 1) {
if ((mgroup.UseAka.zone == t->zone) && (mgroup.UseAka.net == t->net) && mgroup.UpLink.zone &&
strlen(mgroup.AreaFile) && mgroup.Active && mgroup.UserChange) {
if (CheckEchoGroup(Area, TRUE, t) == 0) {
if (CheckEchoGroup(Area, mgroup.UpLink.zone, t) == 0) {
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_FORWARD",Area,aka2str(mgroup.UpLink),"","","");
MsgResult("areamgr.responses",tmp);

View File

@@ -472,7 +472,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
while ((fread(&fgroup, fgrouphdr.recsize, 1, gp)) == 1) {
if ((fgroup.UseAka.zone == t->zone) && (fgroup.UseAka.net == t->net) && fgroup.UpLink.zone &&
strlen(fgroup.AreaFile) && fgroup.Active && fgroup.UserChange) {
if (CheckTicGroup(Area, TRUE, t) == 0) {
if (CheckTicGroup(Area, fgroup.UpLink.zone, t) == 0) {
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_FORWARD",Area,aka2str(fgroup.UpLink),"","","");
MsgResult("filemgr.responses",tmp);

View File

@@ -686,10 +686,14 @@ int Areas(void)
/*
* Sent one uplink command with additions and deletions
*/
if (UplinkRequest(fido2faddr(mgroup.UpLink), FALSE, cmd)) {
WriteError("Uplink request failed");
if (mgroup.UpLink.zone) {
if (UplinkRequest(fido2faddr(mgroup.UpLink), FALSE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(mgroup.UpLink));
}
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(mgroup.UpLink));
Syslog('+', "No uplink defined, not sending a AreaMgr request");
}
free(cmd);
cmd = NULL;
@@ -936,10 +940,14 @@ int Areas(void)
/*
* Sent one uplink command with additions and deletions
*/
if (UplinkRequest(fido2faddr(fgroup.UpLink), TRUE, cmd)) {
WriteError("Uplink request failed");
if (fgroup.UpLink.zone) {
if (UplinkRequest(fido2faddr(fgroup.UpLink), TRUE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(fgroup.UpLink));
}
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(fgroup.UpLink));
Syslog('+', "No uplink defined, not sending a FileMgr request");
}
free(cmd);
cmd = NULL;