FS-3688 please test under same monitoring conditions and report results

This commit is contained in:
Anthony Minessale 2011-11-14 15:26:17 -06:00
parent bc968ca8ad
commit 179f6b57a6
3 changed files with 16 additions and 10 deletions

View File

@ -1414,7 +1414,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
if (switch_core_session_in_thread(session)) {
de->session = session;
}
sofia_process_dispatch_event(&de);
sofia_process_dispatch_event(&de, SWITCH_TRUE);
switch_mutex_unlock(tech_pvt->sofia_mutex);
goto end;
}

View File

@ -1137,5 +1137,5 @@ void sofia_glue_check_dtmf_type(private_object_t *tech_pvt);
void sofia_glue_parse_rtp_bugs(switch_rtp_bug_flag_t *flag_pole, const char *str);
char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, sofia_dispatch_event_t *de, sofia_nat_parse_t *np);
void sofia_glue_pause_jitterbuffer(switch_core_session_t *session, switch_bool_t on);
void sofia_process_dispatch_event(sofia_dispatch_event_t **dep);
void sofia_process_dispatch_event(sofia_dispatch_event_t **dep, switch_bool_t do_callback);

View File

@ -810,7 +810,7 @@ static void our_sofia_event_callback(nua_event_t event,
if (sofia_private && sofia_private->is_call && sofia_private->de) {
sofia_dispatch_event_t *qde = sofia_private->de;
sofia_private->de = NULL;
sofia_process_dispatch_event(&qde);
sofia_process_dispatch_event(&qde, SWITCH_TRUE);
}
profile->last_sip_event = switch_time_now();
@ -1132,7 +1132,7 @@ static void our_sofia_event_callback(nua_event_t event,
}
}
void sofia_process_dispatch_event(sofia_dispatch_event_t **dep)
void sofia_process_dispatch_event(sofia_dispatch_event_t **dep, switch_bool_t do_callback)
{
sofia_dispatch_event_t *de = *dep;
nua_handle_t *nh = de->nh;
@ -1141,8 +1141,10 @@ void sofia_process_dispatch_event(sofia_dispatch_event_t **dep)
*dep = NULL;
our_sofia_event_callback(de->data->e_event, de->data->e_status, de->data->e_phrase, de->nua, de->profile,
de->nh, nua_handle_magic(de->nh), de->sip, de, (tagi_t *) de->data->e_tags);
if (do_callback) {
our_sofia_event_callback(de->data->e_event, de->data->e_status, de->data->e_phrase, de->nua, de->profile,
de->nh, nua_handle_magic(de->nh), de->sip, de, (tagi_t *) de->data->e_tags);
}
nua_destroy_event(de->event);
su_free(nh->nh_home, de);
@ -1166,7 +1168,7 @@ void *SWITCH_THREAD_FUNC sofia_msg_thread_run(switch_thread_t *thread, void *obj
while(switch_queue_pop(q, &pop) == SWITCH_STATUS_SUCCESS && pop) {
sofia_dispatch_event_t *de = (sofia_dispatch_event_t *) pop;
sofia_process_dispatch_event(&de);
sofia_process_dispatch_event(&de, SWITCH_TRUE);
switch_cond_next();
}
@ -1217,7 +1219,7 @@ static void sofia_queue_message(sofia_dispatch_event_t *de)
int idx = 0;
if (mod_sofia_globals.running == 0) {
sofia_process_dispatch_event(&de);
sofia_process_dispatch_event(&de, SWITCH_TRUE);
return;
}
@ -1280,9 +1282,13 @@ void sofia_event_callback(nua_event_t event,
switch_core_session_t *session;
if (!zstr(sofia_private->uuid)) {
if ((session = switch_core_session_locate(sofia_private->uuid))) {
if ((session = switch_core_session_force_locate(sofia_private->uuid))) {
if (switch_core_session_running(session)) {
switch_core_session_queue_signal_data(session, de);
if (switch_channel_down_nosig(switch_core_session_get_channel(session))) {
sofia_process_dispatch_event(&de, SWITCH_FALSE);
} else {
switch_core_session_queue_signal_data(session, de);
}
} else {
switch_core_session_message_t msg = { 0 };
msg.message_id = SWITCH_MESSAGE_INDICATE_SIGNAL_DATA;