freebsd-ports/print/rlpr/files/patch-ip-addr
Mikhail Teterin b7542224fb Add a patch to allow specifying remote printer by IP-address, rather
than only by hostname. Bump PORTREVISION.

PR:	ports/166583
Submitted by:	Norbert Koch

While here:
	* replace the (short) pkg-plist with PLIST_FILES variable;
	* relax permissions on the client binaries from 4511 to 4555 --
	  otherwise tar refuses to package them, when running as non-root;
	* declare license (GPLv2);
	* link to description page, that works (author's site is down);
	* add some working mirrors (author's site is down).

Feature safe:	yes
2012-04-02 16:01:25 +00:00

16 lines
520 B
Text

Support contacting IP-addresses, rather than only the hostnames.
PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=166583
Submited by: Norbert Koch
--- src/util.c Thu Oct 28 08:40:13 1999
+++ src/util.c Mon Apr 2 09:19:43 2012
@@ -73,6 +73,9 @@
sin->sin_port = port_hbo ? htons(port_hbo) : 0;
if (host != 0) {
+ if (inet_aton (host, &sin->sin_addr) == 1) {
+ return 1;
+ }
if ((hp = gethostbyname(host)) == 0) {
msg(R_ERROR, 0, "gethostbyname(%s): %s", host, h_strerror());