Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37402858
en ru br
ALT Linux repos
S:0.2.3-alt7
5.0: 0.2.3-alt2
4.1: 0.2.3-alt1
4.0: 0.2.2-alt2
3.0: 0.2.0-alt1

Group :: System/Libraries
RPM: libgnomecups

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libgnomecups-0.2.2-replace-set-printer-attrs.patch
Download


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
@@ -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);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin