summaryrefslogtreecommitdiff
path: root/ax25.c
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
committerDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
commit3cdcbeea3e2891f4a10c79b272da144f37ff24f3 (patch)
treedc2daaabc2ba68cc125fc21bd35f8e67bdb0499e /ax25.c
parentf7fc865d93f8448779d320ce152f0fa44a64fcad (diff)
New upstream version 0.67upstream/0.67
Diffstat (limited to 'ax25.c')
-rw-r--r--ax25.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/ax25.c b/ax25.c
index 0dfd22c..e55e286 100644
--- a/ax25.c
+++ b/ax25.c
@@ -1526,6 +1526,40 @@ void get_exclude_list(char * line, TStringList * list)
}
}
+void get_digi_list(char * line, TStringList * list)
+{
+ // Convert comma separated list of calls to ax25 format in list
+
+ string axcall;
+
+ char copy[512];
+
+ char * ptr, *Context;
+
+ if (line[0] == 0)
+ return;
+
+ strcpy(copy, line); // copy as strtok messes with it
+ strcat(copy, ",");
+
+ axcall.Length = 7;
+ axcall.AllocatedLength = 8;
+ axcall.Data = malloc(8);
+
+ memset(axcall.Data, 0, 8);
+
+ ptr = strtok_s(copy, " ,", &Context);
+
+ while (ptr)
+ {
+ if (ConvToAX25(ptr, axcall.Data) == 0)
+ return;
+
+ Add(list, duplicateString(&axcall));
+ ptr = strtok_s(NULL, " ,", &Context);
+ }
+}
+
void get_exclude_frm(char * line, TStringList * list)
@@ -1959,7 +1993,7 @@ void ax25_init()
initTStringList(&list_digi_callsigns[i]);
initTStringList(&KISS_acked[i]);
- get_exclude_list(MyDigiCall[i], &list_digi_callsigns[i]);
+ get_digi_list(MyDigiCall[i], &list_digi_callsigns[i]);
get_exclude_list(exclude_callsigns[i], &list_exclude_callsigns[i]);
get_exclude_frm(exclude_APRS_frm[i], &list_exclude_APRS_frm[i]);