提交 36acdb9f authored 作者: Anthony Minessale's avatar Anthony Minessale

props and sofia fix

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5126 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 ab34a260
...@@ -927,7 +927,7 @@ void nua_signal(nua_t *nua, nua_handle_t *nh, msg_t *msg, int always, ...@@ -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; size_t len, xtra, e_len, l_len = 0, l_xtra = 0;
ta_list ta; ta_list ta;
if (nua == NULL || (nua->nua_shutdown_started && event != nua_r_shutdown)) if (nua == NULL)
return; return;
ta_start(ta, tag, value); ta_start(ta, tag, value);
......
...@@ -378,7 +378,8 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_event_data_t *e) ...@@ -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", 901, "Stack is going down",
NULL); NULL);
} }
else switch (event) {
switch (event) {
case nua_r_get_params: case nua_r_get_params:
nua_stack_get_params(nua, nh ? nh : nua->nua_dhandle, event, tags); nua_stack_get_params(nua, nh ? nh : nua->nua_dhandle, event, tags);
break; break;
...@@ -485,8 +486,7 @@ void nua_stack_timer(nua_t *nua, su_timer_t *t, su_timer_arg_t *a) ...@@ -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); su_timer_set(t, nua_stack_timer, a);
if (nua->nua_shutdown) { if (nua->nua_shutdown) {
nua_stack_shutdown(nua); nua_stack_shutdown(nua);
return;
} }
for (nh = nua->nua_handles; nh; nh = nh_next) { for (nh = nua->nua_handles; nh; nh = nh_next) {
......
...@@ -339,7 +339,7 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw ...@@ -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); tech_pvt = (private_object_t *) switch_core_session_get_private(session);
assert(tech_pvt != NULL); 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; return SWITCH_STATUS_FALSE;
} }
...@@ -411,7 +411,7 @@ static switch_status_t sofia_write_video_frame(switch_core_session_t *session, s ...@@ -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; return SWITCH_STATUS_FALSE;
} }
...@@ -443,7 +443,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f ...@@ -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); tech_pvt = (private_object_t *) switch_core_session_get_private(session);
assert(tech_pvt != NULL); 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; return SWITCH_STATUS_FALSE;
} }
...@@ -538,7 +538,7 @@ static switch_status_t sofia_write_frame(switch_core_session_t *session, switch_ ...@@ -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; return SWITCH_STATUS_FALSE;
} }
...@@ -1140,7 +1140,7 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t ...@@ -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")) { if (!strcasecmp(argv[1], "stop") || !strcasecmp(argv[1], "restart")) {
int rsec = 30; int rsec = 3;
int diff = (int) (time(NULL) - profile->started); int diff = (int) (time(NULL) - profile->started);
int remain = rsec - diff; int remain = rsec - diff;
if (diff < rsec) { if (diff < rsec) {
......
...@@ -363,11 +363,6 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void ...@@ -363,11 +363,6 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
su_root_step(profile->s_root, 1000); su_root_step(profile->s_root, 1000);
} }
while(profile->inuse) {
switch_yield(500000);
}
//sofia_reg_check_expire(profile, 0); //sofia_reg_check_expire(profile, 0);
//sofia_reg_check_gateway(profile, 0); //sofia_reg_check_gateway(profile, 0);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论