summaryrefslogtreecommitdiff
path: root/APRSCode.c
diff options
context:
space:
mode:
Diffstat (limited to 'APRSCode.c')
-rw-r--r--APRSCode.c20
1 files changed, 20 insertions, 0 deletions
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)
{