From 36acdb9f52582f7c4abc99f969c2758a395cad99 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 10 May 2007 18:17:34 +0000 Subject: [PATCH] props and sofia fix git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5126 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/libsofia-sip-ua/nua/nua.c | 2 +- libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c | 6 +++--- src/mod/endpoints/mod_sofia/mod_sofia.c | 10 +++++----- src/mod/endpoints/mod_sofia/sofia.c | 5 ----- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua.c index 07140603c9..6c44ff920c 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua.c @@ -927,7 +927,7 @@ void nua_signal(nua_t *nua, nua_handle_t *nh, msg_t *msg, int always, size_t len, xtra, e_len, l_len = 0, l_xtra = 0; ta_list ta; - if (nua == NULL || (nua->nua_shutdown_started && event != nua_r_shutdown)) + if (nua == NULL) return; ta_start(ta, tag, value); diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c index 95acc205e9..1cf9110ecd 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c @@ -378,7 +378,8 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_event_data_t *e) 901, "Stack is going down", NULL); } - else switch (event) { + + switch (event) { case nua_r_get_params: nua_stack_get_params(nua, nh ? nh : nua->nua_dhandle, event, tags); break; @@ -485,8 +486,7 @@ void nua_stack_timer(nua_t *nua, su_timer_t *t, su_timer_arg_t *a) su_timer_set(t, nua_stack_timer, a); if (nua->nua_shutdown) { - nua_stack_shutdown(nua); - return; + nua_stack_shutdown(nua); } for (nh = nua->nua_handles; nh; nh = nh_next) { diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 80a0e1ed11..1f9f15cb6a 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -339,7 +339,7 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw tech_pvt = (private_object_t *) switch_core_session_get_private(session); assert(tech_pvt != NULL); - if (switch_test_flag(tech_pvt, TFLAG_HUP) || !sofia_test_pflag(tech_pvt->profile, PFLAG_RUNNING)) { + if (switch_test_flag(tech_pvt, TFLAG_HUP)) { return SWITCH_STATUS_FALSE; } @@ -411,7 +411,7 @@ static switch_status_t sofia_write_video_frame(switch_core_session_t *session, s } } - if (switch_test_flag(tech_pvt, TFLAG_HUP) || !sofia_test_pflag(tech_pvt->profile, PFLAG_RUNNING)) { + if (switch_test_flag(tech_pvt, TFLAG_HUP)) { return SWITCH_STATUS_FALSE; } @@ -443,7 +443,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f tech_pvt = (private_object_t *) switch_core_session_get_private(session); assert(tech_pvt != NULL); - if (switch_test_flag(tech_pvt, TFLAG_HUP) || !sofia_test_pflag(tech_pvt->profile, PFLAG_RUNNING)) { + if (switch_test_flag(tech_pvt, TFLAG_HUP)) { return SWITCH_STATUS_FALSE; } @@ -538,7 +538,7 @@ static switch_status_t sofia_write_frame(switch_core_session_t *session, switch_ } } - if (switch_test_flag(tech_pvt, TFLAG_HUP) || !sofia_test_pflag(tech_pvt->profile, PFLAG_RUNNING)) { + if (switch_test_flag(tech_pvt, TFLAG_HUP)) { return SWITCH_STATUS_FALSE; } @@ -1140,7 +1140,7 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t if (!strcasecmp(argv[1], "stop") || !strcasecmp(argv[1], "restart")) { - int rsec = 30; + int rsec = 3; int diff = (int) (time(NULL) - profile->started); int remain = rsec - diff; if (diff < rsec) { diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 3b0e7d7483..fb0d873a6d 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -363,11 +363,6 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void su_root_step(profile->s_root, 1000); } - while(profile->inuse) { - switch_yield(500000); - } - - //sofia_reg_check_expire(profile, 0); //sofia_reg_check_gateway(profile, 0);