This is a temporary fix.
The multicast notifications from server side need remote endpoint to be
null in caipadapter.c::CAIPSendDataThread().
But the function signature called from the RI layer into the CA layer
to send responses takes a CARemoteEndpoint struct which cannot be null.
The temp fix is to make caipclient.c think that a response is multicast if
the remoteAddress is the fixed multicast ip 224.0.1.187.
Change-Id: I6720ceb123d044b9c2aa510d41488b5003324e4e
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/922
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
* @brief Logging tag for module name
*/
#define IP_CLIENT_TAG "IP_CLIENT"
+#define OC_MULTICAST_IP "224.0.1.187"
static uint32_t CASendData(const char *remoteAddress, uint16_t port, const void *data,
uint32_t dataLength, int sockfd)
}
uint32_t len = 0;
- if (isMulticast)
+ if (isMulticast || strcmp(remoteAddress, OC_MULTICAST_IP) == 0)
{
uint32_t listIndex = 0;
uint32_t listLength = u_arraylist_length(tempServerInfoList);