Print "thread ID" in debug messages

closes #218
This commit is contained in:
Manuel Pégourié-Gonnard 2015-08-31 16:11:00 +02:00
parent d68434efba
commit 7b23c51595
3 changed files with 44 additions and 12 deletions

View file

@ -25,6 +25,11 @@ void string_debug(void *data, int level, const char *file, int line, const char
*p++ = ':';
*p++ = ' ';
#if defined(MBEDTLS_THREADING_C)
/* Skip "thread ID" (up to the first space) as it is not predictable */
while( *str++ != ' ' );
#endif
memcpy( p, str, strlen( str ) );
p += strlen( str );