From e14e2b1945fd92ced80e58c1038ce4613c536fdb Mon Sep 17 00:00:00 2001 From: Chul Lee Date: Mon, 17 Oct 2016 21:09:46 +0900 Subject: [PATCH] [Hotfix] Remove the segmentation fault while MOT. Segmentation fault was occured by https://gerrit.iotivity.org/gerrit/#/c/13299/ In this patch, MOT device discovery will use the pCandidateList to handle discovered device according to patch 13229. Change-Id: I57d9a603602d49bb3f8e287ae1599f450a044731 Signed-off-by: Chul Lee Reviewed-on: https://gerrit.iotivity.org/gerrit/13341 Reviewed-by: dongik Lee Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- resource/csdk/security/provisioning/src/pmutility.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/csdk/security/provisioning/src/pmutility.c b/resource/csdk/security/provisioning/src/pmutility.c index debfd30..e06e591 100644 --- a/resource/csdk/security/provisioning/src/pmutility.c +++ b/resource/csdk/security/provisioning/src/pmutility.c @@ -1079,7 +1079,7 @@ static OCStackApplicationResult MOTDeviceDiscoveryHandler(void *ctx, OCDoHandle //If this is owend device discovery we have to filter out the responses. DiscoveryInfo* pDInfo = (DiscoveryInfo*)ctx; - OCProvisionDev_t **ppDevicesList = pDInfo->ppDevicesList; + OCProvisionDev_t **ppDevicesList = &pDInfo->pCandidateList; // Get my device ID from doxm resource OicUuid_t myId; @@ -1219,6 +1219,7 @@ OCStackResult PMMultipleOwnerDeviceDiscovery(unsigned short waittime, bool isMul } pDInfo->ppDevicesList = ppDevicesList; + pDInfo->pCandidateList = NULL; pDInfo->isOwnedDiscovery = isMultipleOwned; OCCallbackData cbData; -- 2.7.4