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

Bug#711848: cups-client: lp and lpr print the document on a wrong printer



If I output some messages in the cupsGetNamedDest() function
of cups/dest.c as shown below:

 /*
  * Get the printer's attributes...
  */

  fprintf (stderr, "cupsGetNamedDest: %s\n", name ? name : "");

  if (!_cupsGetDests(http, op, name, &dest, 0, 0))
  {
    if (op == CUPS_GET_DEFAULT || (name && !set_as_default))
      return (NULL);

    if (dest)
      fprintf (stderr, "(1) dest->name: %s\n", dest->name ? dest->name : "");

   /*
    * The default printer from environment variables or from a
    * configuration file does not exist.  Find out the real default.
    */

    if (!_cupsGetDests(http, CUPS_GET_DEFAULT, NULL, &dest, 0, 0))
      return (NULL);

    if (dest)
      fprintf (stderr, "(2) dest->name: %s\n", dest->name ? dest->name : "");
  }

"lpr" (with no options) gives me:

cupsGetNamedDest: lipucb-mono-1
(2) dest->name: lip-multi-1

The problem is 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)


Reply to: