mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 958444: Fix address setup in RIL connector, r=vicamo
The use of htons on the network address truncates its value. Using htonl instead fixes this problem. The change also makes Ril.cpp build without warnings.
This commit is contained in:
parent
ce8c974daf
commit
cde90c3993
@ -251,7 +251,7 @@ RilConnector::CreateAddr(bool aIsServer,
|
||||
case AF_INET:
|
||||
aAddr.in.sin_family = af;
|
||||
aAddr.in.sin_port = htons(RIL_TEST_PORT + mClientId);
|
||||
aAddr.in.sin_addr.s_addr = htons(INADDR_LOOPBACK);
|
||||
aAddr.in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
aAddrSize = sizeof(sockaddr_in);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user