C++ Avoid crash in case of Invalid/Empty Payload
authoromkar <omkar.m.hegde@intel.com>
Fri, 9 Jan 2015 19:34:18 +0000 (11:34 -0800)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 22 Jan 2015 15:34:31 +0000 (15:34 +0000)
commitba73120634accd7064bd9e201926574b2a7e7c7f
treef67a38e25e58c78ec872169d3243e4938422b39f
parentdd3c36d453e4e7d6388ed22e47c50ffbc13e57d5
C++ Avoid crash in case of Invalid/Empty Payload

This change is based on a bug reported by SHP wherein
they want to be able to send response with empty payload.
Instead of throwing an error, we now send an empty
OCRepresentation() object to the client callback.

Change-Id: I16f298bf8a0bdbb545e1133d751582f418991352
Signed-off-by: omkar <omkar.m.hegde@intel.com>
(cherry picked from commit 43e5a4f0a42a739e93f65ccf31eff82df11144c3)
Reviewed-on: https://gerrit.iotivity.org/gerrit/212
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/src/InProcClientWrapper.cpp