Fixed core dump during Security Discovery
authorjs126.lee <js126.lee@samsung.com>
Fri, 24 Feb 2017 08:16:18 +0000 (17:16 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Thu, 2 Mar 2017 04:14:49 +0000 (04:14 +0000)
commit275a415296458768872f78cc56d44e5ad13712a7
treeb7e5285af2ae2a306829d5efe572f862917b9279
parent6c2f03cc54b06faf3002043685bbdf4c5ea40424
Fixed core dump during Security Discovery

Issue : Core dump occur in (un)owned device discovery on provisionclient sample,
        when build option with SECURED=1 WITH_TCP=1 WITH_CLOUD=1.
Cause : Incorrect condition to set remoteId in OCHandleResponse.
        So, wrong type casting happen as OCDiscoveryPayload,
        and then core dump occure in OCCMDiscoveryResource function.
        (https://gerrit.iotivity.org/gerrit/#/c/15909)

Change-Id: I5a4c521ad14f8d5a6a9ec944cfdcfc3b705e409d
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17497
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/stack/src/ocstack.c