mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
mesa: only report up to 50 _mesa_problem() calls
http://bugs.freedesktop.org/show_bug.cgi?id=35200 reports a disk partition getting filled because of warning messages. Stop emitting after 50.
This commit is contained in:
parent
147148fd50
commit
582570a04c
1 changed files with 11 additions and 5 deletions
|
|
@ -930,14 +930,20 @@ _mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
|
|||
{
|
||||
va_list args;
|
||||
char str[MAXSTRING];
|
||||
static int numCalls = 0;
|
||||
|
||||
(void) ctx;
|
||||
|
||||
va_start( args, fmtString );
|
||||
vsnprintf( str, MAXSTRING, fmtString, args );
|
||||
va_end( args );
|
||||
if (numCalls < 50) {
|
||||
numCalls++;
|
||||
|
||||
fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
|
||||
fprintf(stderr, "Please report at bugs.freedesktop.org\n");
|
||||
va_start( args, fmtString );
|
||||
vsnprintf( str, MAXSTRING, fmtString, args );
|
||||
va_end( args );
|
||||
fprintf(stderr, "Mesa %s implementation error: %s\n",
|
||||
MESA_VERSION_STRING, str);
|
||||
fprintf(stderr, "Please report at bugs.freedesktop.org\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue