Temporary queue race proposed fix
For review regarding #871
@michaelrsweet can we create points/steps what needs to be implemented/fixed to make this working? We can look into it as separate issues so make it happen one by one.
The current PR implements resetting temporary queue timer if client requests its creation, which can be one step.
@zdohnal This requires a bit of thought. For starters we need to update cupsd to look for an existing queue with the same device URI. The server also needs to update the temporary queue's expiration date whenever the queue is accessed or listed (not just for print jobs) to prevent the queue from going away while a client is actively polling it.
@michaelrsweet so proposal:
- [ ]
add_printer()andcreate_local_printer()in scheduler/ipp.c has to check existing queues on uri - if the same device URI exists and it is temporary queue, update state time of printer - [ ] every IPP request on the temporary queue has to update state time of printer as well.
I've pushed a different change to master:
[master https://github.com/OpenPrinting/cups/commit/9383b377eba6ddb5ed80ebb244907e9be6ccd169] Update CUPS-Create-Local-Printer to preserve the existing printer based on the device URI (Issue https://github.com/OpenPrinting/cups/issues/871)
See #871 for followup reporting if the problem isn't resolved for you.