mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-25 22:27:58 +00:00
Cosmetics in debug in ssl_{client,server}2.c
Print only the basename from the file, and print level too.
This commit is contained in:
parent
acecb653d5
commit
052f28853b
2 changed files with 14 additions and 4 deletions
|
@ -315,9 +315,14 @@ static void my_debug( void *ctx, int level,
|
|||
const char *file, int line,
|
||||
const char *str )
|
||||
{
|
||||
((void) level);
|
||||
const char *p, *basename;
|
||||
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str );
|
||||
/* Extract basename from file */
|
||||
for( p = basename = file; *p != '\0'; p++ )
|
||||
if( *p == '/' || *p == '\\' )
|
||||
basename = p + 1;
|
||||
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: |%d| %s", basename, line, level, str );
|
||||
fflush( (FILE *) ctx );
|
||||
}
|
||||
|
||||
|
|
|
@ -394,9 +394,14 @@ static void my_debug( void *ctx, int level,
|
|||
const char *file, int line,
|
||||
const char *str )
|
||||
{
|
||||
((void) level);
|
||||
const char *p, *basename;
|
||||
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str );
|
||||
/* Extract basename from file */
|
||||
for( p = basename = file; *p != '\0'; p++ )
|
||||
if( *p == '/' || *p == '\\' )
|
||||
basename = p + 1;
|
||||
|
||||
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: |%d| %s", basename, line, level, str );
|
||||
fflush( (FILE *) ctx );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue