--- gvpe/src/sockinfo.C 2003/04/05 17:54:22 1.5 +++ gvpe/src/sockinfo.C 2003/04/06 04:31:51 1.7 @@ -42,7 +42,8 @@ : prot == PROT_TCPv4 ? htons (conf->tcp_port) : 0; - if (prot && conf->hostname) + if (prot & (PROT_UDPv4 | PROT_TCPv4 | PROT_IPv4) + && conf->hostname) { struct hostent *he = gethostbyname (conf->hostname); @@ -51,7 +52,6 @@ { //sa->sin_family = he->h_addrtype; memcpy (&host, he->h_addr_list[0], 4); - } else slog (L_NOTICE, _("unable to resolve host '%s'"), conf->hostname); @@ -137,7 +137,7 @@ && conf->udp_port) { prot = prot_; - port = conf->udp_port; + port = htons (conf->udp_port); return true; } @@ -147,7 +147,7 @@ && conf->tcp_port) { prot = prot_; - port = conf->tcp_port; + port = htons (conf->tcp_port); return true; } }