do not make the -n flag affect service name lookups

This commit is contained in:
Mike Frysinger 2009-03-06 02:45:46 +00:00
parent 417a3d26a0
commit bda7ada5a1
1 changed files with 4 additions and 0 deletions

View File

@ -464,8 +464,12 @@ USHORT getportpoop (pstring, pnum)
if (pstring) /* one or the other, pleeze */ if (pstring) /* one or the other, pleeze */
return (0); return (0);
x = pnum; x = pnum;
#if 0
/* the -n flag is to disable dns lookup only, and getservby*
functions are not a speed issue at all, so ... */
if (o_nflag) /* go faster, skip getservbyblah */ if (o_nflag) /* go faster, skip getservbyblah */
goto gp_finish; goto gp_finish;
#endif
y = htons (x); /* gotta do this -- see Fig.1 below */ y = htons (x); /* gotta do this -- see Fig.1 below */
servent = getservbyport (y, whichp); servent = getservbyport (y, whichp);
if (servent) { if (servent) {