changeset 14608:38829b121db7

(main): Convert port to network byte order.
author Karl Heuer <kwzh@gnu.org>
date Wed, 21 Feb 1996 17:11:13 +0000
parents 3c86ac6a871a
children a8eeafa7c4af
files lib-src/tcp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/tcp.c	Wed Feb 21 16:32:37 1996 +0000
+++ b/lib-src/tcp.c	Wed Feb 21 17:11:13 1996 +0000
@@ -122,7 +122,7 @@
   bzero (&sockin, sizeof (sockin));
   sockin.sin_family = host->h_addrtype;
   bcopy (host->h_addr, &sockin.sin_addr, host->h_length);
-  sockin.sin_port = port;
+  sockin.sin_port = htons (port);
   if ((server = socket (AF_INET, SOCK_STREAM, 0)) < 0)
     {
       perror ("socket");