[cups.bugs] filter/image.c cache file failure

Michael Sweet msweet at apple.com
Wed Aug 10 08:23:41 PDT 2011


This was STR #3901, which was just recently fixed for the 1.5.1 release:

	http://www.cups.org/str.php?L3901

On Aug 9, 2011, at 5:55 PM, Ted Marston wrote:

> Hi, new to this group, but need to report a bug (with its fix) in
> cups-1.4.6 and cups-1.5.0. The symptom is that large graphics files
> get broken up into chunks, repeated over the printout because the
> cachefile in filter/image.c is never opened and dirty cached image
> tiles are not saved when they are flushed out of the cache.
> 
> I've this also reported of by Brad Allen on Nov 28, 2009, at
> http://www.cups.org/newsgroups.php?s1+gcups.development+v1+T0+Qimagetops
> 
> That site didnt respond when I tried to register, so I'm trying here
> instead.
> 
> One fix is to correct the test for an un-opened cachefile in
> filter/image.c: flush_tile():
> 
> diff filter/image.c.Orig filter/image.c
> 636c636
> <   if (img->cachefile < 0)
> ---
>>  if (img->cachefile == 0)
> 
> This works because the cups_image_t is initialised with zeroes by
> calloc() in filter/image.c: cupsImageOpen(). The zero indicates to
> flush_tile() that a cachefile has not been opened yet. It will only
> be < 0 after cupsTempFd() has failed to open a cachefile.
> 
> I hope someone with better connections can pass this on.
> 
> Thanks.
> 
> Ted Marston
> 
> _______________________________________________
> cups-bugs mailing list
> cups-bugs at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-bugs

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups mailing list