From c858986248f9ee86835be732f413824c0e42d729 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 25 Feb 2025 09:32:57 +0000 Subject: New upstream version 6.0.24.65+repack --- cMain.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'cMain.c') diff --git a/cMain.c b/cMain.c index ea68401..f370490 100644 --- a/cMain.c +++ b/cMain.c @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses -*/ +*/ + // // C replacement for Main.asm @@ -139,6 +140,10 @@ int NODE = 1; // INCLUDE SWITCH SUPPORT int FULL_CTEXT = 1; // CTEXT ON ALL CONNECTS IF NZ +int L4Compress = 0; +int L4CompMaxframe = 3; +int L4CompPaclen = 236; + BOOL LogL4Connects = FALSE; BOOL LogAllConnects = FALSE; BOOL AUTOSAVEMH = TRUE; @@ -822,6 +827,15 @@ BOOL Start() MQTT_PORT = cfg->C_MQTT_PORT; strcpy(MQTT_USER, cfg->C_MQTT_USER); strcpy(MQTT_PASS, cfg->C_MQTT_PASS); + L4Compress = cfg->C_L4Compress; + L4CompMaxframe = cfg->C_L4CompMaxframe; + L4CompPaclen = cfg->C_L4CompPaclen; + + if (L4CompMaxframe < 1 || L4CompMaxframe > 16) + L4CompMaxframe = 3; + + if (L4CompPaclen < 64 || L4CompPaclen > 236) + L4CompPaclen = 236; // Get pointers to PASSWORD and APPL1 commands @@ -1338,7 +1352,7 @@ BOOL Start() ROUTE->NBOUR_PACLEN = Rcfg->ppacl; ROUTE->OtherendsRouteQual = ROUTE->OtherendLocked = Rcfg->farQual; - ROUTE->NEIGHBOUR_FLAG = 1; // Locked + ROUTE->NEIGHBOUR_FLAG = LOCKEDBYCONFIG; // Locked Rcfg++; ROUTE++; @@ -1843,12 +1857,11 @@ VOID ReadNodes() if (ptr == NULL) continue; // I don't thinlk we should load locked flag from save file - only from config - - // But need to parse it until I stop saving it + // Now (2025) have two locked flags, from config or by sysop. Latter is saved and restored if (ptr[0] == '!') { -// ROUTE->NEIGHBOUR_FLAG = 1; // LOCKED ROUTE + ROUTE->NEIGHBOUR_FLAG = LOCKEDBYSYSOP; // LOCKED ROUTE ptr = strtok_s(NULL, seps, &Context); if (ptr == NULL) continue; } @@ -1865,7 +1878,7 @@ VOID ReadNodes() memcpy(ROUTE->NEIGHBOUR_DIGI1, axcall, 7); - ROUTE->NEIGHBOUR_FLAG = 1; // LOCKED ROUTE - Digi'ed routes must be locked + ROUTE->NEIGHBOUR_FLAG = LOCKEDBYSYSOP; // LOCKED ROUTE - Digi'ed routes must be locked ptr = strtok_s(NULL, seps, &Context); if (ptr == NULL) continue; @@ -1921,6 +1934,14 @@ VOID ReadNodes() if (ROUTE->NEIGHBOUR_FLAG == 0 || ROUTE->OtherendLocked == 0); // Not LOCKED ROUTE ROUTE->OtherendsRouteQual = atoi(ptr); + ptr = strtok_s(NULL, seps, &Context); // INP3 + if (ptr == NULL) continue; + + if (ptr[0] == '!') + { + ROUTE->NEIGHBOUR_FLAG = LOCKEDBYSYSOP; // LOCKED ROUTE + ptr = strtok_s(NULL, seps, &Context); + } continue; } -- cgit v1.2.3