Reverse my previous change and use htons() on an int
instead of htonl() ! This results in the int a,b,c,d changing to b,a,c,d, but as it's subsequently coerced to a u_short, the ultimate answer is correct. If this isn't fixed properly soon (by the author) I'll have a look at it again. Noted by: eivind & ari@suutari.iki.fi
This commit is contained in:
parent
91241944ea
commit
27c20503c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31576
@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
|
||||
|
||||
port = strtol (str, &end, 10);
|
||||
if (end != str)
|
||||
return htonl (port);
|
||||
return htons (port);
|
||||
|
||||
sp = getservbyname (str, proto);
|
||||
if (!sp)
|
||||
|
@ -1332,7 +1332,7 @@ int StrToPort (char* str, char* proto)
|
||||
|
||||
port = strtol (str, &end, 10);
|
||||
if (end != str)
|
||||
return htonl (port);
|
||||
return htons (port);
|
||||
|
||||
sp = getservbyname (str, proto);
|
||||
if (!sp)
|
||||
|
Loading…
Reference in New Issue
Block a user