Bug: https://jira.iotivity.org/browse/IOT-2373
Change-Id: Ifd3789538c3d368b7ca3da52d274bb7ed531c126
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20831
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
(cherry picked from commit
bdc2263c344879854b914ec5efd0e232137c49c2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20663
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
void * NSConsumerMsgPushThreadFunc(void * data)
{
+ pthread_mutex_lock(&g_start_mutex);
NSConsumerQueueObject * obj = NULL;
NS_LOG(DEBUG, "get queueThread handle");
if (NULL == g_handle)
{
NSOICFree(data);
+ pthread_mutex_unlock(&g_start_mutex);
return NULL;
}
NSThreadLock(g_handle);
NS_VERIFY_NOT_NULL_WITH_POST_CLEANING(obj, NULL,
{
NSThreadUnlock(g_handle);
+ pthread_mutex_unlock(&g_start_mutex);
NSOICFree(data);
});
}
NSThreadUnlock(g_handle);
+ pthread_mutex_unlock(&g_start_mutex);
return NULL;
}