props and sofia fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5126 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ab34a26079
commit
36acdb9f52
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue