Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2
commoncpp2
commoncpp-socketmemcpy.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File commoncpp-socketmemcpy.dif of Package commoncpp2
Index: commoncpp2-1.6.1/src/socket.cpp =================================================================== --- commoncpp2-1.6.1.orig/src/socket.cpp +++ commoncpp2-1.6.1/src/socket.cpp @@ -1149,7 +1149,7 @@ Socket::Error Socket::join(const IPV4Mul return error(errMulticastDisabled,"Multicast not enabled on socket"); getsockname(so, (struct sockaddr *)&myaddr, &len); - memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(&myaddr.sin_addr)); + memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(myaddr.sin_addr)); group.imr_multiaddr = getaddress(ia); setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group)); return errSuccess; @@ -1170,7 +1170,7 @@ Socket::Error Socket::join(const IPV6Mul return error(errMulticastDisabled,"Multicast not enabled on socket"); getsockname(so, (struct sockaddr *)&myaddr, &len); - memcpy(&group.ipv6mr_interface, &myaddr.sin6_addr, sizeof(&myaddr.sin6_addr)); + group.ipv6mr_interface = myaddr.sin6_scope_id; group.ipv6mr_multiaddr = getaddress(ia); setsockopt(so, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, (char *)&group, sizeof(group)); return errSuccess; @@ -1192,7 +1192,7 @@ Socket::Error Socket::drop(const IPV4Mul return error(errMulticastDisabled,"Multicast not enabled on socket"); getsockname(so, (struct sockaddr *)&myaddr, &len); - memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(&myaddr.sin_addr)); + memcpy(&group.imr_interface, &myaddr.sin_addr, sizeof(myaddr.sin_addr)); group.imr_multiaddr = getaddress(ia); setsockopt(so, IPPROTO_IP, IP_DROP_MEMBERSHIP, (char *)&group, sizeof(group)); return errSuccess; @@ -1213,7 +1213,7 @@ Socket::Error Socket::drop(const IPV6Mul return error(errMulticastDisabled,"Multicast not enabled on socket"); getsockname(so, (struct sockaddr *)&myaddr, &len); - memcpy(&group.ipv6mr_interface, &myaddr.sin6_addr, sizeof(&myaddr.sin6_addr)); + group.ipv6mr_interface = myaddr.sin6_scope_id; group.ipv6mr_multiaddr = getaddress(ia); setsockopt(so, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, (char *)&group, sizeof(group)); return errSuccess;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor