[patch] execute get attributes on correct host



Hi,

The attached patch causes libgnomecups to execute the "get attributes"
request on the remote printer, not the local daemon.  This gives us more
information, particularly the job count, which is used for the next
patch...

Ok to apply?



--- libgnomecups-0.1.9/libgnomecups/gnome-cups-printer.c~	2004-06-21 14:36:54.000000000 -0400
+++ libgnomecups-0.1.9/libgnomecups/gnome-cups-printer.c	2004-07-30 13:12:18.088974008 -0400
@@ -269,6 +269,7 @@
 update_attributes (GnomeCupsPrinter *printer)
 {
 	ipp_t *request;
+	char *host;
 	static const char *attributes[] = {
 	  "printer-state", "queued-job-count",
 	  "printer-location", "printer-info",
@@ -288,12 +289,14 @@
 						     IPP_TAG_OPERATION,
 						     G_N_ELEMENTS (attributes),
 						     (char**)attributes);
+
+	host = _gnome_cups_printer_get_host (printer);
 	printer->details->attributes_request_id = 
-		gnome_cups_request_execute_async (request, NULL, "/",
+		gnome_cups_request_execute_async (request, host, "/",
 						  attributes_update_cb,
 						  g_object_ref (printer),
 						  g_object_unref);
-	
+	g_free (host);
 }
 
 static char *

Attachment: signature.asc
Description: This is a digitally signed message part



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