SVACE issue fixes
authorChul Lee <chuls.lee@samsung.com>
Wed, 19 Oct 2016 06:42:12 +0000 (15:42 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 19 Oct 2016 10:27:59 +0000 (10:27 +0000)
Change-Id: I4cd1fb23818a560449ae1ff3f2635c14ef093da7
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13435
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/provisioning/sample/sampleserver_randompin.cpp
resource/csdk/security/provisioning/src/pmutility.c

index f8e651a..a7a9d8f 100644 (file)
@@ -156,7 +156,12 @@ static void* oc_process_loop(void* ptr)
 
     while(g_LoopFlag)
     {
-        OCProcess();
+        if (OCProcess() != OC_STACK_OK)
+        {
+            OIC_LOG(ERROR, TAG, "OCStack process error");
+            g_LoopFlag = false;
+            break;
+        }
         nanosleep(&timeout, NULL);
     }
     pthread_join(&oc_process_thread, NULL);
index e06e591..d6e24e8 100644 (file)
@@ -844,7 +844,10 @@ static void DeviceDiscoveryDeleteHandler(void *ctx)
         {
             OIC_LOG_V(DEBUG, TAG, "OCCancel - %s : %d",
                             pDev->endpoint.addr, pDev->endpoint.port);
-            OCCancel(pDev->handle,OC_HIGH_QOS,NULL,0);
+            if(OC_STACK_OK !=  OCCancel(pDev->handle,OC_HIGH_QOS,NULL,0))
+            {
+                OIC_LOG(ERROR, TAG, "Failed to remove registered callback");
+            }
         }
         PMDeleteDeviceList(pDInfo->pCandidateList);
     }