[patch] execute get attributes on correct host
Colin Walters <[email protected]> Fri, 30 Jul 2004 13:23:20 -0400
| Newsgroups | gmane.comp.gnome.print |
|---|---|
| Message-ID | <[email protected]> |
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? _______________________________________________ gnome-print-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-print-list
libgnomecups-0.1.9-get-attributes-from-host.patch
(text/x-patch, 900 B)
--- 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 *
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBCoQHOIkJWWp2WGURAoAPAJ4pFsYHsZoSzhZXukh4/24vwHZjggCeIjZd h9cwH75ekIhA6ivfOtp7rfU= =EDok -----END PGP SIGNATURE-----