Hi,

This bug has been fixed in Ubuntu a while ago. We also fixed four
other important bugs which you should adopt in Debian as well.

For your convenience I attach the current diff.

Thanks,

Martin
-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?
diff -pruN 0.2.2-1/debian/changelog 0.2.2-1ubuntu5/debian/changelog
--- 0.2.2-1/debian/changelog    2006-06-27 16:21:38.000000000 +0100
+++ 0.2.2-1ubuntu5/debian/changelog     2006-06-27 16:21:38.000000000 +0100
@@ -1,3 +1,50 @@
+libgnomecups (0.2.2-1ubuntu5) dapper; urgency=low
+
+  * libgnomecups/gnome-cups-printer.c, gnome_cups_printer_get_is_local():
+    - Regard https URLs as non-local, too.
+    - Thanks to VETSEL Patrice for catching this.
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Thu, 18 May 2006 14:12:51 +0200
+
+libgnomecups (0.2.2-1ubuntu4) dapper; urgency=low
+
+  * libgnomecups/gnome-cups-printer.c, gnome_cups_printer_get_is_local(): 
+    - Fix detection of local printers: Remote printers do not have an empty
+      device URI, but one starting with http://, ipp://, or smb://.
+    - Thanks to VETSEL Patrice for debugging this.
+    - Closes: LP#41400
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Thu, 18 May 2006 12:11:04 +0200
+
+libgnomecups (0.2.2-1ubuntu3) dapper; urgency=low
+
+  * libgnomecups/gnome-cups-printer.c, parse_lpoptions(): Do not only look in
+    the obsolete ~/.lpoptions file, but also into ~/.cups/lptoptions. This
+    fixes the handling of user defined printer settings, default printer, etc.
+    Closes: LP#34112 and half a thousand duplicates.
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Wed, 17 May 2006 15:53:27 +0200
+
+libgnomecups (0.2.2-1ubuntu2) dapper; urgency=low
+
+  * libgnomecups/gnome-cups-printer.c: 
+    - Replace IPP_SET_PRINTER_ATTRIBUTES call with CUPS_ADD_MODIFY_PRINTER,
+      since Cups does not implement the former. (See
+      http://lists.samba.org/archive/samba-technical/2003-February/027044.html)
+    - Thanks to Amos Brocco for this patch!
+    - See LP#8023
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Fri, 12 May 2006 09:52:31 +0200
+
+libgnomecups (0.2.2-1ubuntu1) dapper; urgency=low
+
+  * libgnomecups/gnome-cups-request.c: Do not issue a g_warning() on
+    IPP_NOT_FOUND. This avoids generating huge ~/.xsession-errors log files
+    with tons of 'IPP request failed with status 1030' lines.
+    Closes: LP#38042
+
+ -- Martin Pitt <[EMAIL PROTECTED]>  Thu,  6 Apr 2006 12:50:23 +0200
+
 libgnomecups (0.2.2-1) unstable; urgency=low
 
   * New upstream release.
diff -pruN 0.2.2-1/libgnomecups/gnome-cups-printer.c 
0.2.2-1ubuntu5/libgnomecups/gnome-cups-printer.c
--- 0.2.2-1/libgnomecups/gnome-cups-printer.c   2005-09-23 21:52:49.000000000 
+0100
+++ 0.2.2-1ubuntu5/libgnomecups/gnome-cups-printer.c    2006-06-27 
16:21:38.000000000 +0100
@@ -510,6 +510,10 @@ parse_lpoptions (cups_dest_t **dests)
        num_dests = cups_get_dests (filename, num_dests, dests);
        g_free (filename);
 
+       filename = g_build_filename (g_get_home_dir (), ".cups", "lpoptions", 
NULL);
+       num_dests = cups_get_dests (filename, num_dests, dests);
+       g_free (filename);
+
        return num_dests;
 }
 
@@ -976,8 +980,11 @@ gnome_cups_printer_get_is_local (GnomeCu
 {
        g_return_val_if_fail (GNOME_CUPS_IS_PRINTER (printer), FALSE);
 
-       return (printer->details->device_uri != NULL) && 
-               (strcmp (printer->details->device_uri, "") != 0);
+       return printer->details->device_uri != NULL && 
+               strncmp(printer->details->device_uri, "smb:", 4) != 0 &&
+               strncmp(printer->details->device_uri, "http:", 5) != 0 &&
+               strncmp(printer->details->device_uri, "https:", 5) != 0 &&
+               strncmp(printer->details->device_uri, "ipp:", 4)  != 0;
 }
 
 void
@@ -1237,6 +1244,9 @@ gnome_cups_printer_get_description (Gnom
        
 }
 
+/* Define the CUPS-Add-Modify-Printer, see 
http://www.cups.org/documentation.php/spec-ipp.html#CUPS_ADD_MODIFY_PRINTER */
+#define CUPS_ADD_MODIFY_PRINTER 0x4003
+
 void
 gnome_cups_printer_set_description (GnomeCupsPrinter *printer,
                                    const char *description,
@@ -1252,7 +1262,9 @@ gnome_cups_printer_set_description (Gnom
                return;
        }
 
-       request = gnome_cups_request_new_for_printer 
(IPP_SET_PRINTER_ATTRIBUTES,
+       /* As read in 
http://lists.samba.org/archive/samba-technical/2003-February/027044.html 
+       CUPS does not currently support IPP_SET_PRINTER_ATTRIBUTES, so a  is 
used */
+       request = gnome_cups_request_new_for_printer (CUPS_ADD_MODIFY_PRINTER,
                                                      printer);
        ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_TEXT,
                      "printer-info", NULL, description);
@@ -1283,9 +1295,9 @@ gnome_cups_printer_set_location (GnomeCu
        if (!strcmp (location, printer->details->location)) {
                return;
        }
-
+       /* Same as above (IPP_SET_PRINTER_ATTRIBUTES replaced by 
CUPS-Add-Modify-Printer ) */
        request = gnome_cups_request_new_for_printer (
-               IPP_SET_PRINTER_ATTRIBUTES, printer);
+               CUPS_ADD_MODIFY_PRINTER, printer);
        ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_TEXT,
                "printer-location", NULL, location);
        response = gnome_cups_request_execute (request, NULL, "/admin/", error);
diff -pruN 0.2.2-1/libgnomecups/gnome-cups-request.c 
0.2.2-1ubuntu5/libgnomecups/gnome-cups-request.c
--- 0.2.2-1/libgnomecups/gnome-cups-request.c   2005-03-28 16:43:06.000000000 
+0100
+++ 0.2.2-1ubuntu5/libgnomecups/gnome-cups-request.c    2006-06-27 
16:21:38.000000000 +0100
@@ -349,7 +349,7 @@ request_thread_main (GnomeCupsRequest *r
                if (request->response == NULL)
                        status = IPP_INTERNAL_ERROR;
 
-               if (status > IPP_OK_CONFLICT) {
+               if (status > IPP_OK_CONFLICT && status != IPP_NOT_FOUND) {
                        g_warning ("IPP request failed with status %d", status);
                        if (request->error != NULL)
                                *(request->error) = g_error_new 
(GNOME_CUPS_ERROR, 

Attachment: signature.asc
Description: Digital signature

Reply via email to