check logic what payload is parsed was modified in
https://gerrit.iotivity.org/gerrit/#/c/15197/.
However that change cause some issue which
there is no payload in case of error message
with general get/put/post/delete message except for oic/res.
payload should be set in common in OCHandleResponse method.
Change-Id: I0c415022e35573ae76e730d9973206d218f18174
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17165
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
OICFree(response);
return;
}
+
// In case of error, still want application to receive the error message.
- if (OCResultToSuccess(response->result))
+ if (OCResultToSuccess(response->result) || PAYLOAD_TYPE_REPRESENTATION == type)
{
if (OC_STACK_OK != OCParsePayload(&response->payload,
type,