to check payload have to contain option data.
Change-Id: Ib8d1cb9946cd1e4723531de986129e8e30f32c09
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3569
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
}
size_t payloadLen = 0;
- if (pdu->data)
+ size_t headerSize = coap_get_tcp_header_length_for_transport(transport);
+ OIC_LOG_V(DEBUG, TAG, "headerSize : %d, pdu length : %d",
+ headerSize, pdu->length);
+ if (pdu->length > headerSize)
{
payloadLen = (unsigned char *) pdu->hdr + pdu->length - pdu->data;
}