if (strncmp(info->ipAddress, ipAddress, strlen(ipAddress)) == 0)
{
- if (!info->subnetMask)
- {
- OIC_LOG(ERROR, IP_MONITOR_TAG,
- "CAIPGetInterfaceSubnetMask subnetmask is null");
- }
OIC_LOG_V(DEBUG, IP_MONITOR_TAG,
"CAIPGetInterfaceSubnetMask subnetmask is %s", info->subnetMask);
- *subnetMask = info->subnetMask ? OICStrdup(info->subnetMask) : NULL;
+ *subnetMask = OICStrdup(info->subnetMask);
break;
}
}
for (listIndex = 0; listIndex < listLength; listIndex++)
{
CANetInfo_t *netInfo = (CANetInfo_t *) u_arraylist_get(netInterfaceList, listIndex);
- if (!netInfo || !netInfo->ipAddress)
+ if (!netInfo)
{
continue;
}
{
CANetInfo_t *netInfo = (CANetInfo_t *) u_arraylist_get(netInterfaceList, listIndex);
- if (!netInfo || !netInfo->ipAddress)
+ if (!netInfo)
{
continue;
}
for (listIndex = 0; listIndex < listLength; listIndex++)
{
CANetInfo_t *netInfo = (CANetInfo_t *) u_arraylist_get(netInterfaceList, listIndex);
- if (!netInfo || !netInfo->ipAddress)
+ if (!netInfo)
{
continue;
}
{
sockAddr.sin_addr.s_addr = inet_addr(localIp);
}
- else
- {
- sockAddr.sin_addr.s_addr = htonl(INADDR_ANY);
- }
int16_t i = 0;
bool isBound = false;
}
CACloseSocket(info->socketFd);
OICFree(info);
- OIC_LOG_V(DEBUG, IP_SERVER_TAG,
- "Multicast server is stopped successfully on IF [%s]", info->ifAddr);
+ OIC_LOG(DEBUG, IP_SERVER_TAG, "Multicast server is stopped successfully.");
// Reduce list length by 1 as we removed one element.
listLength--;
}
{
CACloseSocket(info->socketFd);
OICFree(info);
- OIC_LOG_V(DEBUG, IP_SERVER_TAG,
- "Unicast server is stopped successfully on IF [%s]", info->ifAddr);
+ OIC_LOG(DEBUG, IP_SERVER_TAG, "Unicast server is stopped successfully.");
// Reduce list length by 1 as we removed one element.
listLength--;
}
if (strncmp(info->ipAddress, ipAddress, strlen(ipAddress)) == 0)
{
- if (!info->subnetMask)
- {
- OIC_LOG(ERROR, IP_MONITOR_TAG,
- "CAIPGetInterfaceSubnetMask subnetmask is null");
- }
OIC_LOG_V(DEBUG, IP_MONITOR_TAG,
"CAIPGetInterfaceSubnetMask subnetmask is %s", info->subnetMask);
- *subnetMask = info->subnetMask ? OICStrdup(info->subnetMask) : NULL;
+ *subnetMask = OICStrdup(info->subnetMask);
break;
}
}
if (strncmp(info->ipAddress, ipAddress, strlen(ipAddress)) == 0)
{
- if (!info->subnetMask)
- {
- OIC_LOG(ERROR, IP_MONITOR_TAG,
- "CAIPGetInterfaceSubnetMask subnetmask is null");
- }
OIC_LOG_V(DEBUG, IP_MONITOR_TAG,
"CAIPGetInterfaceSubnetMask subnetmask is %s", info->subnetMask);
- *subnetMask = info->subnetMask ? OICStrdup(info->subnetMask) : NULL;
+ *subnetMask = OICStrdup(info->subnetMask);
break;
}
}