diff options
Diffstat (limited to 'lib/ZOpenPort.c')
-rw-r--r-- | lib/ZOpenPort.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ZOpenPort.c b/lib/ZOpenPort.c index 46ae4af..9374b78 100644 --- a/lib/ZOpenPort.c +++ b/lib/ZOpenPort.c @@ -33,7 +33,7 @@ Code_t ZOpenPort(port) bindin.sin_family = AF_INET; if (port && *port) - bindin.sin_port = htons(*port); + bindin.sin_port = *port; else bindin.sin_port = htons(((getpid()*8)&0xfff)+ ((random()>>4)&0xf)+1024); @@ -55,11 +55,11 @@ Code_t ZOpenPort(port) } } while (retval < 0 && port); - __Zephyr_port = ntohs(bindin.sin_port); + __Zephyr_port = bindin.sin_port; __Zephyr_open = 1; if (port) - *port = ntohs(bindin.sin_port); + *port = bindin.sin_port; return (ZERR_NONE); } |