Fixed crash on rec'd invalid data.
authorErich Keane <erich.keane@intel.com>
Mon, 12 Jan 2015 17:51:31 +0000 (09:51 -0800)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 22 Jan 2015 02:45:56 +0000 (02:45 +0000)
commit65ecd8a508bf04d03153a9510a78995715242963
treec4309f43248293ab29cca609aca759538480b5c1
parent9b4cd2cbb3c4cfb239f274a6f1d564fe34d2adfe
Fixed crash on rec'd invalid data.

This issue is a fix for IOT 114.

Previously, a bad series of JSON coming in would cause an exception
to be thrown. this would result in the callback/server crashing, which
is not appropriate behavior. This fix catches and logs any JSON
errors keeping the callback/server from crashing.

NOTE: This changeset is originally from 01.org(changeset 695,
author: Erich Keane).

Change-Id: I1e7d042f243bc1b86771778c308f1187bcda875f
Signed-Off-by:Sudarshan Prasad<sudarshan.prasad@intel.com>
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/103
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/include/ocstack.h
resource/include/OCException.h
resource/include/OCResourceRequest.h
resource/makefile
resource/src/InProcClientWrapper.cpp
resource/src/OCResourceRequest.cpp [new file with mode: 0644]
resource/src/SConscript