Before OCStop() is called, listen thread for calling OCProcess() should
be terminated.
Change-Id: Ibe4f702bb7c71beaf8bb58a8fe21acb873ad06d6
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13583
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
#define TAG "ENROLLEE_SAMPLE"
void *listeningFunc(void *);
+pthread_t thread_handle = NULL;
/**
* Secure Virtual Resource database for Iotivity Server
}
printf("ESInitEnrollee Success\n");
- pthread_t thread_handle = NULL;
if (pthread_create(&thread_handle, NULL, listeningFunc, NULL))
{
printf("Thread creation failed\n");
return;
}
+ if (0 != pthread_cancel(thread_handle))
+ {
+ printf("Thread cancellation failed\n");
+ return;
+ }
+
//stop OC Stack
if (OCStop() != OC_STACK_OK)
{