diff --git a/examples/freertos_plus_tcp/z_scout.c b/examples/freertos_plus_tcp/z_scout.c index 349a4c6e9..c73785779 100644 --- a/examples/freertos_plus_tcp/z_scout.c +++ b/examples/freertos_plus_tcp/z_scout.c @@ -20,13 +20,14 @@ #include "FreeRTOS.h" -void fprintzid(FILE *stream, z_bytes_t zid) { - if (zid.start == NULL) { +void fprintzid(FILE *stream, z_id_t zid) { + unsigned int zidlen = _z_id_len(zid); + if (zidlen == 0) { fprintf(stream, "None"); } else { fprintf(stream, "Some("); - for (unsigned int i = 0; i < zid.len; i++) { - fprintf(stream, "%02X", (int)zid.start[i]); + for (unsigned int i = 0; i < zidlen; i++) { + fprintf(stream, "%02X", (int)zid.id[i]); } fprintf(stream, ")"); }