Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set temp queue as default destination if there is no permanent queue installed #833

Open
zdohnal opened this issue Nov 24, 2023 · 2 comments
Assignees
Labels
bug Something isn't working investigating Investigating the issue waiting for reporter There are data requested from the reporter

Comments

@zdohnal
Copy link
Member

zdohnal commented Nov 24, 2023

CUPS 2.4.7, Fedora 38

$ lpstat -a
$ lpstat -e
test_linux
$ lpoptions -d test_linux
device-uri=ipps://test%20%40%20linux._ipps._tcp.local/cups printer-info='test @ linux' printer-make-and-model='PostScript Printer' printer-type=25178190
$ lpstat -d
no system default destination

It happens because because we use _cupsGetDests() in cupsSetDests2() for getting printers, but IPP_OP_GET_PRINTERS returns only permanent queues, thus cupsSetDests2() ends because it hits IPP_ERROR_NOT_FOUND.
I'm on the way with fix - I was able to set the default destination when I use cupsGetDests2() instead of _cupsGetDests(), but I was not able to remove the settings with lpoptions -x test_linux - I will look into it further.

@zdohnal zdohnal added bug Something isn't working investigating Investigating the issue labels Nov 24, 2023
@michaelrsweet
Copy link
Member

This is likely a timing issue, but I'd be interested in seeing what "lpstat -p" shows after running the lpoptions command. IPP_OP_CUPS_GET_PRINTERS (CUPS-Get-Printers) returns temporary queues that have been created with CUPS-Create-Local-Printer but haven't "expired"...

@michaelrsweet
Copy link
Member

@zdohnal Ping, just trying to close the loop on this...

@michaelrsweet michaelrsweet self-assigned this Apr 16, 2024
@michaelrsweet michaelrsweet added the waiting for reporter There are data requested from the reporter label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigating Investigating the issue waiting for reporter There are data requested from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants