Skip to content
Snippets Groups Projects
Commit 5012efb1 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Log an error and exit immediately when a local linked-node is configured

When a linked-node (in echocfg->Linked Nodes) contains one of the local system's FTN addresses, display/log an error and exit immediately, e.g.:
Configuration ERROR: Linked node #20 is your own address: 1:103/705

I'd perform this check in EchoCfg, but:
1. echocfg doesn't read the BBS's configuration files (where the local FTN addresses are configured), and
2. some sysops just directly edit their sbbsecho.ini file
parent e535aaac
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -6242,6 +6242,14 @@ int main(int argc, char **argv)
return -1;
}
for(uint u = 0; u < cfg.nodecfgs; u++) {
if(sysfaddr_is_valid(find_sysfaddr(cfg.nodecfg[u].addr, true))) {
lprintf(LOG_ERR, "Configuration ERROR: Linked node #%u is your own address: %s"
,u + 1, faddrtoa(&cfg.nodecfg[u].addr));
bail(1);
}
}
char* tmpdir = FULLPATH(NULL, cfg.temp_dir, sizeof(cfg.temp_dir)-1);
if(tmpdir != NULL) {
SAFECOPY(cfg.temp_dir, tmpdir);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment