From 5bda089e30a24fb8011c22b5b77905ed8b1f3533 Mon Sep 17 00:00:00 2001 From: Achim Kraus Date: Tue, 30 Jan 2024 20:23:37 +0100 Subject: [PATCH] Report automatic mode also for select multi-imsi cards. Signed-off-by: Achim Kraus --- src/coap_appl_client.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/coap_appl_client.c b/src/coap_appl_client.c index 55cee2c..e94fbab 100644 --- a/src/coap_appl_client.c +++ b/src/coap_appl_client.c @@ -244,7 +244,7 @@ int coap_appl_client_parse_data(uint8_t *data, size_t len) if (format == COAP_CONTENT_FORMAT_TEXT_PLAIN && payload_len < sizeof(appl_context.message_buf)) { memmove(appl_context.message_buf, payload, payload_len); appl_context.message_buf[payload_len] = 0; - dtls_info("===== %u bytes", (unsigned int) payload_len); + dtls_info("===== %u bytes", (unsigned int)payload_len); coap_appl_client_decode_text_payload(appl_context.message_buf); dtls_info("====="); } else { @@ -440,8 +440,13 @@ int coap_appl_client_prepare_sim_info(char *buf, size_t len, int flags) dtls_info("%s", buf); start = index + 1; if (sim_info.imsi_select_support && sim_info.imsi_select != 0xffff) { - index += snprintf(buf + index, len - index, "\nMulti-IMSI: %s (imsi %u)", - sim_info.imsi, sim_info.imsi_select & 0xff); + if (sim_info.imsi_select) { + index += snprintf(buf + index, len - index, "\nMulti-IMSI: %s (imsi %u)", + sim_info.imsi, sim_info.imsi_select & 0xff); + } else { + index += snprintf(buf + index, len - index, "\nMulti-IMSI: %s (imsi %u, auto %d s)", + sim_info.imsi, sim_info.imsi_select & 0xff, sim_info.imsi_interval); + } } else if (sim_info.prev_imsi[0]) { index += snprintf(buf + index, len - index, "\nMulti-IMSI: %s, %s, %d s", sim_info.imsi, sim_info.prev_imsi, sim_info.imsi_interval);