Browse Source

Fix service name to port resolution

tags/v0.9
Přemysl Janouch 5 years ago
parent
commit
d53f2baa3b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      zyklonb.c

+ 1
- 1
zyklonb.c View File

@@ -995,7 +995,7 @@ socks_connect (const char *socks_host, const char *socks_port,
unsigned long port_no;
const struct servent *serv;
if ((serv = getservbyname (port, "tcp")))
port_no = (uint16_t) serv->s_port;
port_no = (uint16_t) ntohs (serv->s_port);
else if (!xstrtoul (&port_no, port, 10) || !port_no || port_no > UINT16_MAX)
{
error_set (e, "invalid port number");

Loading…
Cancel
Save