diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-01-01 23:47:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-01-01 23:47:45 +0000 |
commit | 29282c6ec90a7592323b919e746e204d12e01419 (patch) | |
tree | 5a5527e24c88ef1367ab6f944aba77ed6f71d07f /modules | |
parent | 9020751b2a83a8cc4116309e03e70a868844dd39 (diff) | |
download | gtk+-29282c6ec90a7592323b919e746e204d12e01419.tar.gz |
Fix some IPP compliance issues. (#391523, Albrecht Dress)
2007-01-01 Matthias Clasen <mclasen@redhat.com>
Fix some IPP compliance issues. (#391523, Albrecht Dress)
* modules/printbackends/cups/gtkcupsutils.c
(gtk_cups_request_encode_option): Use IPP_TAG_JOB, not
IPP_TAG_OPERATION.
* modules/printbackends/cups/gtkprintbackendcups.c
(gtk_print_backend_cups_print_stream): Don't add the
requesting-user-name attribute a second time.
svn path=/trunk/; revision=17002
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkcupsutils.c | 19 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index e2e4b157ad..db790c89d5 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -364,10 +364,15 @@ _find_option_tag (const gchar *option) } } +/* + * Note that this function uses IPP_TAG_JOB, so it is + * only suitable for IPP Group 2 attributes. + * See RFC 2911. + */ void gtk_cups_request_encode_option (GtkCupsRequest *request, const gchar *option, - const gchar *value) + const gchar *value) { ipp_tag_t option_tag; @@ -391,7 +396,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, case IPP_TAG_INTEGER: case IPP_TAG_ENUM: ippAddInteger (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, strtol (value, NULL, 0)); @@ -407,7 +412,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, b = 1; ippAddBoolean(request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, b); @@ -439,7 +444,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, upper = lower; ippAddRange (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, lower, upper); @@ -467,7 +472,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, units = IPP_RES_PER_INCH; ippAddResolution (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option, units, xres, @@ -526,7 +531,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, { /* single value */ ippAddString (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, NULL, @@ -540,7 +545,7 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, g_ptr_array_add (strings, next); ippAddStrings (request->ipp_request, - IPP_TAG_OPERATION, + IPP_TAG_JOB, option_tag, option, strings->len, diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 8351325fb4..0002bd3403 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -422,9 +422,6 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, cups_printer->printer_uri); - gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", - NULL, cupsUser()); - title = gtk_print_job_get_title (job); if (title) gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, |