mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
plug-ins: avoid log-spamming by tiff plug-in
* last log I checked had over 30.000 tiff msgs * limit tiff_io_warning() and tiff_io_error() to a max of 3 msgs
This commit is contained in:
parent
08fa28d6f9
commit
4730ec4eb0
1 changed files with 12 additions and 0 deletions
|
@ -163,6 +163,8 @@ tiff_reset_file_size_error (void)
|
||||||
tiff_file_size_error = FALSE;
|
tiff_file_size_error = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint max_msgs_per_instance = 3;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tiff_io_warning (const gchar *module,
|
tiff_io_warning (const gchar *module,
|
||||||
const gchar *fmt,
|
const gchar *fmt,
|
||||||
|
@ -170,6 +172,11 @@ tiff_io_warning (const gchar *module,
|
||||||
{
|
{
|
||||||
gint tag = 0;
|
gint tag = 0;
|
||||||
|
|
||||||
|
if (max_msgs_per_instance > 0)
|
||||||
|
max_msgs_per_instance--;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
/* Between libtiff 3.7.0beta2 and 4.0.0alpha. */
|
/* Between libtiff 3.7.0beta2 and 4.0.0alpha. */
|
||||||
if (! strcmp (fmt, "%s: unknown field with tag %d (0x%x) encountered") ||
|
if (! strcmp (fmt, "%s: unknown field with tag %d (0x%x) encountered") ||
|
||||||
/* Before libtiff 3.7.0beta2. */
|
/* Before libtiff 3.7.0beta2. */
|
||||||
|
@ -280,6 +287,11 @@ tiff_io_error (const gchar *module,
|
||||||
{
|
{
|
||||||
gchar *msg;
|
gchar *msg;
|
||||||
|
|
||||||
|
if (max_msgs_per_instance > 0)
|
||||||
|
max_msgs_per_instance--;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
/* Workaround for: http://bugzilla.gnome.org/show_bug.cgi?id=132297
|
/* Workaround for: http://bugzilla.gnome.org/show_bug.cgi?id=132297
|
||||||
* Ignore the errors related to random access and JPEG compression
|
* Ignore the errors related to random access and JPEG compression
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue