Package: cupsys
Version: 1.1.23-7
Severity: important
Tags: patch

The cost of the first filter of a filter chain is not taken into
account to compute the whole cost of the chain. So if we take the
following mime.convs :

------
image/jpeg              application/vnd.cups-postscript 1       imagetops
application/vnd.cups-postscript application/vnd.cups-raster     1       
/usr/lib/cups/filter/pstoraster
image/jpeg              application/vnd.cups-raster     100     imagetoraster
------

cups will always choose the direct imagetoraster when given a jpeg to
print to a raster printer since 0 (the cost of the path to the printer
after imagetoraster) is less than 1 (the cost of the path to printer
after imagetops).

The obvious patch is, if I have well-understood the source of the
problem:

Begin
--- old-cupsys-1.1.23/scheduler/filter.c        2005-04-05 19:49:42.000000000 
+0200
+++ cupsys-1.1.23/scheduler/filter.c    2005-04-10 11:29:23.000000000 +0200
@@ -222,7 +222,7 @@
       * any...)
       */
 
-      for (j = 0, cost = 0; j < num_temp; j ++)
+      for (j = 0, cost = current->cost; j < num_temp; j ++)
         cost += temp[j].cost;
 
       if (cost < mincost)
End


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-2-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages cupsys depends on:
ii  adduser                     3.59         Add and remove users and groups
ii  debconf                     1.4.41       Debian configuration management sy
ii  libc6                       2.3.2.ds1-19 GNU C Library: Shared libraries an
ii  libcupsimage2               1.1.23-7     Common UNIX Printing System(tm) - 
ii  libcupsys2-gnutls10         1.1.23-7     Common UNIX Printing System(tm) - 
ii  libgnutls11                 1.0.16-13    GNU TLS library - runtime library
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  libpaper1                   1.1.14-3     Library for handling paper charact
ii  libslp1                     1.0.11-7     OpenSLP libraries
ii  patch                       2.5.9-2      Apply a diff file to an original
ii  perl-modules                5.8.4-8      Core Perl modules
ii  xpdf-utils                  3.00-10      Portable Document Format (PDF) sui
ii  zlib1g                      1:1.2.2-4    compression library - runtime

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to