[cups] Disabling ippDelete

Michael Sweet msweet at apple.com
Thu Jul 28 12:30:41 PDT 2016


Noha,

The only supported way to preserve the IPP request message is to use cupsSendRequest and cupsGetResponse.  Add a while loop to handle retries for HTTP_STATUS_UNAUTHORIZED and HTTP_STATUS_UPGRADE_REQUIRED...


> On Jul 28, 2016, at 3:07 PM, Noha Taha <noha.taha at gmail.com> wrote:
> 
> Hi,
> We would like to use cupsDoRequest but be able to reuse the request after
> the call to retry on certain conditions of choice. We cannot re-use the
> request object since it is freed using ippDelete. I noticed that the ipp_t
> structure has a "use" attribute which defaults to 1 on a new ipp request ..
> Is it possible to set that field higher in such a way that the request will
> not be freed? Or will that have any other side effects? Note the
> implementation of ippDelete:
> ipp->use --;
> if (ipp->use > 0)
>   return;
> I could not find anything in the documentation about that attribute. I'm
> aware that cupsSendRequest will not free the request but I need to use
> cupsDoRequest for other features it provides such as retrying and
> authentication as needed.
> Thank you,
> Noha
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups

_________________________________________________________
Michael Sweet, Senior Printing System Engineer




More information about the cups mailing list