Skip to content

Commit ee2805a

Browse files
committed
"decode_aprs" utility should not get so upset over q-constructs.
1 parent a6f0ad5 commit ee2805a

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

ax25_pad.c

+12-2
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,8 @@ int ax25_parse_addr (int position, char *in_addr, int strict, char *out_addr, in
755755
if (strict && strlen(in_addr) >= 2 && strncmp(in_addr, "qA", 2) == 0) {
756756

757757
text_color_set(DW_COLOR_ERROR);
758-
dw_printf ("%sAddress \"%s\" is a \"q-construct\" used for communicating\n", position_name[position], in_addr);
759-
dw_printf ("with APRS Internet Servers. It was not expected here.\n");
758+
dw_printf ("%sAddress \"%s\" is a \"q-construct\" used for communicating with\n", position_name[position], in_addr);
759+
dw_printf ("APRS Internet Servers. It should never appear when going over the radio.\n");
760760
}
761761

762762
//dw_printf ("ax25_parse_addr in: %s\n", in_addr);
@@ -779,11 +779,21 @@ int ax25_parse_addr (int position, char *in_addr, int strict, char *out_addr, in
779779

780780
out_addr[i++] = *p;
781781
out_addr[i] = '\0';
782+
783+
#if DECAMAIN // Hack when running in decode_aprs utility.
784+
// Exempt the "qA..." case because it was already mentioned.
785+
786+
if (strict && islower(*p) && strncmp(in_addr, "qA", 2) != 0) {
787+
text_color_set(DW_COLOR_ERROR);
788+
dw_printf ("%sAddress has lower case letters. \"%s\" must be all upper case.\n", position_name[position], in_addr);
789+
}
790+
#else
782791
if (strict && islower(*p)) {
783792
text_color_set(DW_COLOR_ERROR);
784793
dw_printf ("%sAddress has lower case letters. \"%s\" must be all upper case.\n", position_name[position], in_addr);
785794
return 0;
786795
}
796+
#endif
787797
}
788798

789799
j = 0;

decode_aprs.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -4891,7 +4891,9 @@ int main (int argc, char *argv[])
48914891

48924892
decode_aprs_print (&A); // Now print it in human readable format.
48934893

4894-
(void)ax25_check_addresses(pp); // Errors for invalid addresses.
4894+
// This seems to be redundant because we used strict option
4895+
// when parsing the monitoring format text.
4896+
//(void)ax25_check_addresses(pp); // Errors for invalid addresses.
48954897

48964898
// Future? Add -d option to include hex dump and maybe KISS?
48974899

0 commit comments

Comments
 (0)