From 9a44d00480888cb11c614034489cc048d798f40f Mon Sep 17 00:00:00 2001 From: John Wiseman Date: Fri, 6 Jan 2023 10:06:45 +0000 Subject: 6.0.23.36 --- APRSCode.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'APRSCode.c') diff --git a/APRSCode.c b/APRSCode.c index 8d70dd6..d3fe994 100644 --- a/APRSCode.c +++ b/APRSCode.c @@ -2038,6 +2038,12 @@ static int APRSProcessLine(char * buf) return TRUE; } + if (_stricmp(ptr, "SaveAPRSMsgs") == 0) + { + SaveAPRSMsgs = TRUE; + return TRUE; + } + p_value = strtok(NULL, " \t\n\r"); if (p_value == NULL) @@ -4640,6 +4646,20 @@ Dll struct STATIONRECORD * APIENTRY APPLFindStation(char * Call, BOOL AddIfNotF Dll struct APRSMESSAGE * APIENTRY APRSGetMessageBuffer() { struct APRSMESSAGE * ptr = MessageRecordPool; + + if (ptr == NULL) + { + // try getting oldest + + ptr = SMEM->Messages; + + if (ptr) + { + SMEM->Messages = ptr->Next; + memset(ptr, 0, sizeof(struct APRSMESSAGE)); + } + return ptr; + } if (ptr) { -- cgit v1.2.3