Skip to content
Commit e0de4ff2 authored by Pete Skeggs's avatar Pete Skeggs Committed by Jukka Rissanen
Browse files

net: mqtt: log struct mqtt_utf8 with hexdump



Add NET_HEXDUMP_DBG/ERR/WARN/INFO macros, then use them for new
MQTT_HEXDUMP_TRC/ERR/WARN/INFO macros.

Log struct mqtt_utf8 using MQTT_HEXDUMP_TRC. One cannot safely log
mqtt_utf8 strings due to no guarantee of a NULL terminator being
present.  Also, logging without log_strdup() as if it were a NULL
terminated string asserts when CONFIG_LOG_IMMEDIATE=n. This solves
both issues.

Signed-off-by: default avatarPete Skeggs <peter.skeggs@nordicsemi.no>
parent dccfe766
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment