memset(&multicastRequest, 0, sizeof(multicastRequest));
in_addr_t mcastGroupAddr = inet_addr(m_mcastGroup.c_str());
- if (!IN_MULTICAST(mcastGroupAddr)) {
+ if (!IN_MULTICAST(ntohl(mcastGroupAddr))) {
return false;
}
virtual bool applyExtraSocketOptions(int sockFd) override
{
- if (setsockopt(sockFd, IPPROTO_IP, IP_MULTICAST_TTL, (void *) &m_ttl, sizeof(m_ttl)) == -1) {
+ if (setsockopt(sockFd, IPPROTO_IP, IP_MULTICAST_TTL, static_cast<void *>(&m_ttl), sizeof(m_ttl)) == -1) {
return false;
}
RUNNER_ASSERT_MSG(udpMulticastServerApp.isAlive(), "UDP multicast server was not running");
udpMulticastServerApp.stop();
- RUNNER_ASSERT_MSG(udpMulticastServerApp.getReceivedBytes() > 0, "UDP multicast server didn't receive any data");
+ RUNNER_ASSERT_MSG(udpMulticastServerApp.getReceivedBytes() == 0, "UDP multicast server received some data");
}