# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: H:\My Documents\Projects\CUPS\cups-1.3.x\berkeley # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: lpq.c --- lpq.c Base (BASE) +++ lpq.c Locally Modified (Based On LOCAL) @@ -370,23 +370,23 @@ * job-uri or printer-uri */ - request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS); - - if (dest == NULL) + if (dest == NULL && id) { - if (id) - sprintf(resource, "ipp://localhost/jobs/%d", id); - else - strcpy(resource, "ipp://localhost/jobs"); + sprintf(resource, "ipp://localhost/jobs/%d", id); + request = ippNewRequest(IPP_GET_JOB_ATTRIBUTES); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, resource); } else { - httpAssembleURIf(HTTP_URI_CODING_ALL, resource, sizeof(resource), "ipp", + if (dest) + httpAssembleURIf(HTTP_URI_CODING_ALL, resource, sizeof(resource), "ipp", NULL, "localhost", 0, "/printers/%s", dest); + else + strcpy(resource, "ipp://localhost/"); + request = ippNewRequest(IPP_GET_JOBS); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, resource); }