-
Notifications
You must be signed in to change notification settings - Fork 457
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
The -h option is overridden by _cupsSetDefaults settings when the IPP port is not given #4675
Comments
CUPS.org User: mike Vincent, The default port has to be 0 to force the call to _cupsSetDefaults, but afterwards it should no longer be 0... Investigating... |
CUPS.org User: mike OK, looks like cupsSetServer did not set the default port while _cupsSetDefaults does. Fix attached. |
"str4675.patch": Index: cups/usersys.c--- cups/usersys.c (revision 12810)
if (cg->http) if (!cg->ipp_port)
- }if (!cg->user[0]) @@ -1151,6 +1146,26 @@ /*
+/*
|
Version: 2.0.3
CUPS.org User: vinc17
The -h option (e.g. for lpstat) is ignored when the server name is not followed by the port:
ypig:~> lpstat -h localhost -H -a
lipps.lip.ens-lyon.fr:443
[output: all remote printers]
ypig:~> lpstat -h localhost:631 -H -a
localhost:631
lpstat: No destinations added.
In latrace output, the first difference between the two invocations occurs in cupsSetServer [/usr/lib/x86_64-linux-gnu/libcups.so.2], here in cups/usersys.c:
This is expected. The next difference occurs here in ippPort() in cups/ipp-support.c:
if (!cg->ipp_port)
_cupsSetDefaults();
_cupsSetDefaults() is called only when the port is not provided. This means that by default, cg->ipp_port is 0. The default port should not be 0. This makes no sense!
My Debian bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711327
and the above explanation:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711327#40
The text was updated successfully, but these errors were encountered: