rlpr only accepts hostnames as parameter for e.g. -H. The patch first checks for a valid ip address using inet_aton() and then for a hostname. This works for my network-connected hp laser printer. I am subitting this here because the port's main web site is unreachable. Fix: --- src/util.c Thu Oct 29 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()); Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->mi mi@aldan.algebra.com => mi@ (via the GNATS Auto Assign Tool)
Maintainer of print/rlpr, Please note that PR ports/166583 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/166583 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
mi 2012-04-02 16:01:25 UTC FreeBSD ports repository Modified files: print/rlpr Makefile pkg-descr Added files: print/rlpr/files patch-ip-addr Removed files: print/rlpr pkg-plist Log: 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 Revision Changes Path 1.24 +8 -3 ports/print/rlpr/Makefile 1.1 +16 -0 ports/print/rlpr/files/patch-ip-addr (new) 1.4 +1 -0 ports/print/rlpr/pkg-descr 1.2 +0 -4 ports/print/rlpr/pkg-plist (dead) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed, thanks!