diff options
author | Mike Wakerly <> | 2009-03-24 18:37:37 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 18:37:37 -0700 |
commit | 224d80c8d9dd3339a2bd277cf0a32941d53a849f (patch) | |
tree | 64c600695672c7c2010001af95d022c860f66e49 | |
parent | 6e9aaa7487570351360ada9630f1684d25a2183d (diff) | |
download | libcore-224d80c8d9dd3339a2bd277cf0a32941d53a849f.zip libcore-224d80c8d9dd3339a2bd277cf0a32941d53a849f.tar.gz libcore-224d80c8d9dd3339a2bd277cf0a32941d53a849f.tar.bz2 |
Automated import from //branches/donutburger/...@140825,140825
-rwxr-xr-x | luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp b/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp index de01295..f79c019 100755 --- a/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp +++ b/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp @@ -3084,7 +3084,12 @@ static void osNetworkSystem_setSocketOptionImpl(JNIEnv* env, jclass clazz, if ((anOption >> 16) & BROKEN_MULTICAST_IF) { return; } - result = setsockopt(handle, IPPROTO_IP, IP_MULTICAST_IF, &sockVal, sockSize); + struct ip_mreqn mcast_req; + memset(&mcast_req, 0, sizeof(mcast_req)); + memcpy(&(mcast_req.imr_address), &(sockVal.sin_addr), + sizeof(struct in_addr)); + result = setsockopt(handle, IPPROTO_IP, IP_MULTICAST_IF, + &mcast_req, sizeof(mcast_req)); if (0 != result) { throwSocketException(env, convertError(errno)); return; |