Commit 0f31960fb4bf066b4afa4c74bed5838816fec729

Authored by Georg Hopp
1 parent fe1cb3bb

convert port to host notation

Showing 1 changed file with 2 additions and 2 deletions
@@ -90,9 +90,9 @@ TR_CLASSVARS_DECL(TR_Socket) {}; @@ -90,9 +90,9 @@ TR_CLASSVARS_DECL(TR_Socket) {};
90 90
91 #define TR_socketAddrPort(socket) \ 91 #define TR_socketAddrPort(socket) \
92 ((socket)->addr.info.sa_family == AF_INET \ 92 ((socket)->addr.info.sa_family == AF_INET \
93 - ? (socket)->addr.in.sin_port \ 93 + ? ntohs((socket)->addr.in.sin_port) \
94 : (socket)->addr.info.sa_family == AF_INET6 \ 94 : (socket)->addr.info.sa_family == AF_INET6 \
95 - ? (socket)->addr.in6.sin6_port \ 95 + ? ntohs((socket)->addr.in6.sin6_port) \
96 : 0) 96 : 0)
97 97
98 #define TR_socketAddrIp(socket) \ 98 #define TR_socketAddrIp(socket) \
Please register or login to post a comment