From 9f59729fb19e41ab12d90053fb1684ad5ae1aa69 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Thu, 13 Mar 2025 14:55:08 -0400 Subject: [PATCH] Disable Debug Catch All UTF8 Decode on unknown PDU types; --- src/dmr_pdu.c | 12 ++++++------ src/p25p1_pdu_data.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dmr_pdu.c b/src/dmr_pdu.c index 4715775..27b03af 100644 --- a/src/dmr_pdu.c +++ b/src/dmr_pdu.c @@ -461,9 +461,9 @@ void decode_ip_pdu (dsd_opts * opts, dsd_state * state, uint16_t len, uint8_t * { sprintf (state->dmr_lrrp_gps[slot], " IP Call SRC: %d; Port; %d; DST: %d; Port: %d;", src24, port1, dst24, port2); fprintf (stderr, "Unknown UDP Port;"); - if (len > 28) - utf8_to_text(state, 0, len-28, input+28); - else utf8_to_text(state, 0, len, input+28); + // if (len > 28) //default catch all (debug only) + // utf8_to_text(state, 0, len-28, input+28); + // else utf8_to_text(state, 0, len, input+28); } } @@ -472,9 +472,9 @@ void decode_ip_pdu (dsd_opts * opts, dsd_state * state, uint16_t len, uint8_t * { sprintf (state->dmr_lrrp_gps[slot], " IP Call SRC: %d; DST: %d; Protocol: %d;", src24, dst24, prot); fprintf(stderr, "Unknown IP Protocol: %02X;", prot); - if (len > 28) - utf8_to_text(state, 0, len-28, input+28); - else utf8_to_text(state, 0, len, input+28); + // if (len > 28) //default catch all (debug only) + // utf8_to_text(state, 0, len-28, input+28); + // else utf8_to_text(state, 0, len, input+28); } } diff --git a/src/p25p1_pdu_data.c b/src/p25p1_pdu_data.c index d0f8bd4..de935ec 100644 --- a/src/p25p1_pdu_data.c +++ b/src/p25p1_pdu_data.c @@ -254,12 +254,12 @@ void p25_decode_pdu_data(dsd_opts * opts, dsd_state * state, uint8_t * input, in else if (sap == 48) //Tier 1 Location Service (or does it depend on the io bit?) utf8_to_text(state, 0, len-ptr, input+ptr); //TODO, read initial string, i.e., $GPRMC and properly decode - else //default catch all - { - if (len > ptr) - utf8_to_text(state, 0, len-ptr, input+ptr); - else utf8_to_text(state, 0, len, input+ptr); - } + // else //default catch all (debug only) + // { + // if (len > ptr) + // utf8_to_text(state, 0, len-ptr, input+ptr); + // else utf8_to_text(state, 0, len, input+ptr); + // } } else {