[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#711848: closed by Didier Raboud <odyx@debian.org> (Bug#711848: fixed in cups 1.6.2-10)



Filed as Apple Bug Report:

    <rdar://problem/14290628> cups.org: cupsGetNamedDest returns the wrong default printer

On Jun 27, 2013, at 8:21 AM, Vincent Lefevre <vincent@vinc17.net> wrote:

> On 2013-06-27 11:28:51 +0200, Vincent Lefevre wrote:
>> This problem still occurs after the upgrade to cups 1.6.2-10.
> 
> In the changelog:
> 
>    printers' list to avoid jobs to go to unexpected printers
>    (Closes: #711848)
> 
> This patch was modifying the cupsGetDests2() function, which was
> already working here and was not used by lp and lpr. These commands
> use cupsGetNamedDest() instead, and the bug seems to be there. I've
> written a patch (attached) to modify cupsGetNamedDest() so that it
> mimics what lpq does: instead of using
> 
>  _cupsGetDests(http, CUPS_GET_DEFAULT, NULL, &dest, 0, 0)
> 
> which returns a wrong default (the system default instead of the
> default from ~/.cups/lpoptions), it uses cupsGetDests2 and gets
> the default.
> 
> I don't know whether this patch is clean (in particular, I'm not sure
> about the memory handling) and I haven't tested it extensively, but it
> solves my problem.
> 
> BTW, it's rather annoying that different functions/commands use
> different interfaces to get the default printer. This leads to
> inconsistencies, as shown here.
> 
> -- 
> Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
> <cups-1.6-dest.patch>

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair


Reply to: