Commit 5012efb1 authored by Rob Swindell's avatar Rob Swindell 💬
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
......@@ -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));
char* tmpdir = FULLPATH(NULL, cfg.temp_dir, sizeof(cfg.temp_dir)-1);
if(tmpdir != NULL) {
SAFECOPY(cfg.temp_dir, tmpdir);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment