From: Michael R Sweet Date: Thu, 29 Apr 2021 12:00:58 +0000 (-0400) Subject: Set request-id for monitoring threads. X-Git-Tag: v2.4b1~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=260c4c6bec6b2132bb2bea3e307ee3a49b904833;p=thirdparty%2Fcups.git Set request-id for monitoring threads. --- diff --git a/tools/ipptool.c b/tools/ipptool.c index 36f93eacad..9dba8c7f5a 100644 --- a/tools/ipptool.c +++ b/tools/ipptool.c @@ -960,6 +960,7 @@ do_monitor_printer_state( // Create a query request that we'll reuse... request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); + ippSetRequestId(request, data->request_id * 100 - 1); ippSetVersion(request, data->version / 10, data->version % 10); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, data->monitor_uri); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser()); @@ -984,6 +985,8 @@ do_monitor_printer_state( while (!data->monitor_done && !Cancel) { // Poll the printer state... + ippSetRequestId(request, ippGetRequestId(request) + 1); + if ((status = cupsSendRequest(http, request, resource, ippLength(request))) != HTTP_STATUS_ERROR) { response = cupsGetResponse(http, resource);