POSIX says never to compare pthread_t directly

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16501 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene committed 2010-01-24 19:23:58 +00:00
1 parent 4f39fe92ab
commit 62341a9526
3 files changed
+17 -4

No files matched your search

+1 -4
View File
@@ -1143,10 +1143,7 @@ SWITCH_DECLARE(void) switch_core_session_disable_heartbeat(switch_core_session_t
SWITCH_DECLARE(switch_bool_t) switch_core_session_in_thread(switch_core_session_t *session)
{
if (switch_thread_self() == session->thread_id) {
return SWITCH_TRUE;
}
return SWITCH_FALSE;
return switch_thread_equal(switch_thread_self(), session->thread_id) ? SWITCH_TRUE : SWITCH_FALSE;
}
static void *SWITCH_THREAD_FUNC switch_core_session_thread(switch_thread_t *thread, void *obj)