FSCORE-576

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17065 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2010-03-22 16:22:19 +00:00
parent 4bf3f5c86f
commit b481cf0e21
3 changed files with 9 additions and 2 deletions

View File

@@ -308,7 +308,7 @@ SWITCH_DECLARE(char *) switch_core_get_uuid(void)
}
static void *switch_core_service_thread(switch_thread_t *thread, void *obj)
static void *SWITCH_THREAD_FUNC switch_core_service_thread(switch_thread_t *thread, void *obj)
{
switch_core_session_t *session = obj;
switch_channel_t *channel;
@@ -321,6 +321,8 @@ static void *switch_core_service_thread(switch_thread_t *thread, void *obj)
return NULL;
}
switch_mutex_lock(session->frame_read_mutex);
channel = switch_core_session_get_channel(session);
switch_channel_set_flag(channel, CF_SERVICE);
@@ -336,7 +338,10 @@ static void *switch_core_service_thread(switch_thread_t *thread, void *obj)
}
}
switch_mutex_unlock(session->frame_read_mutex);
switch_core_session_rwunlock(session);
return NULL;
}
@@ -360,7 +365,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session)
channel = switch_core_session_get_channel(session);
switch_assert(channel);
switch_core_session_launch_thread(session, switch_core_service_thread, session);
switch_core_session_launch_thread(session, (void *(*)(switch_thread_t *,void *))switch_core_service_thread, session);
}
/* This function abstracts the thread creation for modules by allowing you to pass a function ptr and