net: log_strdup() was missing when printing thread name

If CONFIG_THREAD_NAME is enabled, we must use log_strdup() when
printing the thread name.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2020-06-16 12:45:13 +03:00
parent 8ac2f96ca6
commit 5f3d999bb9

View file

@ -45,8 +45,8 @@ extern "C" {
/* Network subsystem logging helpers */
#ifdef CONFIG_THREAD_NAME
#define NET_DBG(fmt, ...) LOG_DBG("(%s): " fmt, \
k_thread_name_get(k_current_get()), \
##__VA_ARGS__)
log_strdup(k_thread_name_get(k_current_get())), \
##__VA_ARGS__)
#else
#define NET_DBG(fmt, ...) LOG_DBG("(%p): " fmt, k_current_get(), \
##__VA_ARGS__)