[Freeswitch-svn] [commit] r12361 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia
FreeSWITCH SVN
anthm at freeswitch.org
Mon Mar 2 15:55:00 PST 2009
Author: anthm
Date: Mon Mar 2 17:55:00 2009
New Revision: 12361
Log:
FSCORE-297
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/switch_scheduler.c
freeswitch/trunk/src/switch_time.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Mon Mar 2 17:55:00 2009
@@ -394,9 +394,9 @@
(char *) sip->sip_request->rq_method_name, tech_pvt->key, strlen(tech_pvt->key), network_ip, NULL, 0,
REG_INVITE, NULL);
}
-
+
if (auth_res != AUTH_OK) {
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+ //switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
nua_respond(nh, SIP_401_UNAUTHORIZED, TAG_END());
goto done;
}
Modified: freeswitch/trunk/src/switch_scheduler.c
==============================================================================
--- freeswitch/trunk/src/switch_scheduler.c (original)
+++ freeswitch/trunk/src/switch_scheduler.c Mon Mar 2 17:55:00 2009
@@ -285,9 +285,11 @@
return delcnt;
}
+switch_thread_t *task_thread_p = NULL;
+
SWITCH_DECLARE(void) switch_scheduler_task_thread_start(void)
{
- switch_thread_t *thread;
+
switch_threadattr_t *thd_attr;
switch_core_new_memory_pool(&globals.memory_pool);
@@ -295,7 +297,7 @@
switch_mutex_init(&globals.task_mutex, SWITCH_MUTEX_NESTED, globals.memory_pool);
switch_threadattr_detach_set(thd_attr, 1);
- switch_thread_create(&thread, thd_attr, switch_scheduler_task_thread, NULL, globals.memory_pool);
+ switch_thread_create(task_thread_p, thd_attr, switch_scheduler_task_thread, NULL, globals.memory_pool);
}
SWITCH_DECLARE(void) switch_scheduler_task_thread_stop(void)
@@ -303,8 +305,11 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping Task Thread\n");
if (globals.task_thread_running == 1) {
int sanity = 0;
+ switch_status_t st;
globals.task_thread_running = -1;
+
+ switch_thread_join(&st, task_thread_p);
while (globals.task_thread_running) {
switch_yield(100000);
Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c (original)
+++ freeswitch/trunk/src/switch_time.c Mon Mar 2 17:55:00 2009
@@ -174,7 +174,7 @@
SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t)
{
- if (t < 1000 || t >= 10000) {
+ if (!globals.RUNNING || t < 1000 || t >= 10000) {
do_sleep(t);
return;
}
More information about the Freeswitch-svn
mailing list