michaelrsweet / lprint

A Label Printer Application
https://www.msweet.org/lprint
Apache License 2.0
219 stars 29 forks source link

Documentation doesn't match parameter names: Docs: `server-name` Code: `server-hostname` #87

Closed SmittyHalibut closed 1 year ago

SmittyHalibut commented 1 year ago

When using -o server-name=myhost.mydomain.com, it would still only bind to myhost.local. I dug into the code and see that it's actually looking for server-hostname not server-name as is documented. When I switched to -o server-hostname=myhost.mydomain.com it worked as expected.

Documentation: https://www.msweet.org/lprint/lprint.html

Running a Server

The “server” sub-command runs a standalone spooler. The following options control the server operation:

    “-o listen-name=HOSTNAME”: Sets the network hostname to resolve for listen addresses - “*” for the wildcard addresses.
    “-o server-name=HOSTNAME”: Sets the network hostname to advertise.

Code: https://github.com/michaelrsweet/lprint/blob/master/lprint.c#L459-L460

  hostname    = cupsGetOption("server-hostname", num_options, options);
  listenhost  = cupsGetOption("listen-hostname", num_options, options);
michaelrsweet commented 1 year ago

This is already fixed in the main branch.