Commit acdf0b66 authored by Oleksandr Dmytrenko's avatar Oleksandr Dmytrenko Committed by Randeep

[IOT-2912] randompin

sample randompin server refactoring

Bug: https://jira.iotivity.org/browse/IOT-2912
Change-Id: I4aa744a34d706a995fb8d4d7d2927ff29a2ec39a
Signed-off-by: default avatarOleksandr Dmytrenko <o.dmytrenko@samsung.com>
parent dbd17971
......@@ -150,7 +150,7 @@ const char *getResult(OCStackResult result) {
#include <chrono>
static bool volatile g_LoopFlag;
static std::thread* oc_process_thread;
static std::thread* oc_process_thread = nullptr;
static void oc_process_loop()
{
......@@ -170,6 +170,11 @@ static void StartOCProcessThread()
{
g_LoopFlag = true;
oc_process_thread = new std::thread(oc_process_loop);
if(nullptr == oc_process_thread)
{
OIC_LOG_V(ERROR, TAG, "%s start thread mail loop returns null, exit.", __func__);
::exit(1);
}
}
static void StopOCProcessThread()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment