Printers: Set requesting-user-name when getting job info

CUPS has changed its policy for giving informations about jobs.
This fixes problem with actualization of list of print jobs.
This commit is contained in:
Marek Kasik 2011-10-26 14:17:22 +02:00
parent 332bcb8d6c
commit 6029100642

View file

@ -292,12 +292,14 @@ on_cups_notification (GDBusConnection *connection,
if ((http = httpConnectEncrypt (cupsServer (), ippPort (),
cupsEncryption ())) != NULL)
{
request = ippNewRequest(IPP_GET_JOB_ATTRIBUTES);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
request = ippNewRequest (IPP_GET_JOB_ATTRIBUTES);
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_URI,
"job-uri", NULL, job_uri);
ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, cupsUser ());
ippAddStrings (request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", G_N_ELEMENTS (requested_attrs), NULL, requested_attrs);
response = cupsDoRequest(http, request, "/");
response = cupsDoRequest (http, request, "/");
if (response)
{