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:
Thomas Zimmermann 2014-01-10 12:40:57 +01:00
parent ce8c974daf
commit cde90c3993

View File

@ -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: