server: Don't dump more than 1024 bytes in a trace.
This commit is contained in:
parent
065fa22adc
commit
b824fe05f4
|
@ -373,7 +373,7 @@ static void dump_varargs_user_handles( const char *prefix, data_size_t size )
|
||||||
static void dump_varargs_bytes( const char *prefix, data_size_t size )
|
static void dump_varargs_bytes( const char *prefix, data_size_t size )
|
||||||
{
|
{
|
||||||
const unsigned char *data = cur_data;
|
const unsigned char *data = cur_data;
|
||||||
data_size_t len = size;
|
data_size_t len = min( 1024, size );
|
||||||
|
|
||||||
fprintf( stderr,"%s{", prefix );
|
fprintf( stderr,"%s{", prefix );
|
||||||
while (len > 0)
|
while (len > 0)
|
||||||
|
@ -381,6 +381,7 @@ static void dump_varargs_bytes( const char *prefix, data_size_t size )
|
||||||
fprintf( stderr, "%02x", *data++ );
|
fprintf( stderr, "%02x", *data++ );
|
||||||
if (--len) fputc( ',', stderr );
|
if (--len) fputc( ',', stderr );
|
||||||
}
|
}
|
||||||
|
if (size > 1024) fprintf( stderr, "...(total %u)", size );
|
||||||
fputc( '}', stderr );
|
fputc( '}', stderr );
|
||||||
remove_data( size );
|
remove_data( size );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue