Fixed CopyEndpointToDevAddr function to copy CAEndpoint_t id to OCDevAddr id
so that the endpoint id is propagated to stack.
Change-Id: I3b6f2ec502ab041ab36745231eac3818838eeb6b
Signed-off-by: Shilpa Sodani <shilpa.a.sodani@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1962
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
out->adapter = (OCTransportAdapter)in->adapter;
out->flags = CAToOCTransportFlags(in->flags);
- strncpy(out->addr, in->addr, MAX_ADDR_STR_SIZE);
- out->addr[MAX_ADDR_STR_SIZE - 1] = '\0';
+ OICStrcpy(out->addr, sizeof(out->addr), in->addr);
out->port = in->port;
+ memcpy(&out->identity.id, &in->identity.id, sizeof(out->identity.id));
+ out->identity.id_length = in->identity.id_length;
}
void CopyDevAddrToEndpoint(const OCDevAddr *in, CAEndpoint_t *out)