Date: Fri, 8 Mar 2002 05:00:04 -0800 (PST) From: Tilman Linneweh <tilman@arved.de> To: freebsd-ports@FreeBSD.org Subject: Re: ports/35401: New Port: news/newscache 0.99.19 Message-ID: <200203081300.g28D04t58879@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/35401; it has been noted by GNATS. From: Tilman Linneweh <tilman@arved.de> To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: ports/35401: New Port: news/newscache 0.99.19 Date: 08 Mar 2002 14:03:34 +0100 --=-fQkMxcoNncIt4JGcQTRB Content-Type: multipart/mixed; boundary="=-kXdeaV/kaOJL3RV3ER1T" --=-kXdeaV/kaOJL3RV3ER1T Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Please add this patch to the files directory. As this port isn't committed yet :(, there is no need to change PORTREVISION. regards arved --=-kXdeaV/kaOJL3RV3ER1T Content-Disposition: attachment; filename=patch-fillHostStruct Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable --- src/NewsCache.cc 19 Feb 2002 21:12:15 -0000 1.8 +++ src/NewsCache.cc 8 Mar 2002 10:50:56 -0000 1.11 @@ -311,12 +311,22 @@ =20 if ( strcmp(pHost, "DEFAULT") =3D=3D 0 ) { addr->sin_addr.s_addr =3D INADDR_ANY; - } else if ( ((addr->sin_addr.s_addr =3D inet_addr(pHost)) =3D=3D INADDR_N= ONE) &&=20 - ((host =3D gethostbyname (pHost)) =3D=3D NULL) ) { - slog.p(Logger::Error) << fname << ": gethostbyname (" << pHost \ - << ") error: " << strerror(errno) << "\n"; - if (portFlg) *p =3D ':'; - return -1; + } else if ( (addr->sin_addr.s_addr =3D inet_addr(pHost)) =3D=3D INADDR_NO= NE) {=20 + if ((host =3D gethostbyname (pHost)) =3D=3D NULL | host->h_addrtype != =3D AF_INET) { + if (portFlg) *p =3D ':'; + slog.p(Logger::Error) << fname << ": gethostbyname (" << pHost \ + << ") error: " << strerror(errno) << "\n"; + return -1; + } else { + if (host->h_addr_list[0]) { + memcpy (&addr->sin_addr.s_addr, host->h_addr_list[0], host->h_length); + } else { + if (portFlg) *p =3D ':'; + slog.p(Logger::Error) << fname << ":host->h_addr_list[0] of " + << pHost << "not valid\n"; + return -1; + } + }=09 } if (portFlg) *p =3D ':'; =20 --=-kXdeaV/kaOJL3RV3ER1T-- --=-fQkMxcoNncIt4JGcQTRB Content-Type: application/pgp-signature; name=signature.asc Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Weitere Infos: siehe http://www.gnupg.org iD8DBQA8iLamEH3do0kMxDoRAnyPAJ9wLQAIdhMPL9mHTNGAaGb8fjdONACfQsbT 6x3Q8mJobfyfIQVbm+kyzUc= =XBjl -----END PGP SIGNATURE----- --=-fQkMxcoNncIt4JGcQTRB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203081300.g28D04t58879>