From 47411e1046704656eaa76edf32231ab4057ddc02 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Wed, 20 May 2020 04:53:37 +0000
Subject: [PATCH] Fix issue reported by Alterego: Don't auto-add sub-boards to
 the area file if the echotag is already in the area file (but marked as
 pass-through or associated with a different sub-board already). This
 configuration could result in the same sub-board(s) being auto-added to the
 area file for every invocation of sbbsecho.

---
 src/sbbs3/sbbsecho.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c
index 277ed4696c..73d8914b1e 100644
--- a/src/sbbs3/sbbsecho.c
+++ b/src/sbbs3/sbbsecho.c
@@ -1912,6 +1912,10 @@ bool add_sub_to_arealist(sub_t* sub, fidoaddr_t uplink)
 	}
 	strupr(echotag);
 
+	for(unsigned u=0; u < cfg.areas; u++) {
+		if(stricmp(cfg.area[u].tag, echotag) == 0)
+			return false;
+	}
 	lprintf(LOG_INFO, "Adding sub-board (%-*s) to Area %s with uplink %s, tag: %s"
 		,LEN_EXTCODE, sub->code, cfg.auto_add_to_areafile ? "File" : "List", smb_faddrtoa(&uplink, NULL), echotag);
 
-- 
GitLab