FS-3213 --resolve

This commit is contained in:
Anthony Minessale 2011-05-04 10:03:45 -05:00
parent 88f4828c88
commit 789a9ce8d1
2 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
Mon Jun 7 20:09:38 EDT 2010 Wed May 4 10:03:23 CDT 2011

View File

@ -220,7 +220,7 @@ static void *SWITCH_THREAD_FUNC timer_thread_run(switch_thread_t *thread, void *
} }
for (pvt = t38_state_list.head; pvt; pvt = pvt->next) { for (pvt = t38_state_list.head; pvt; pvt = pvt->next) {
if (pvt->udptl_state) { if (pvt->udptl_state && pvt->session && switch_channel_ready(switch_core_session_get_channel(pvt->session))) {
t38_terminal_send_timeout(pvt->t38_state, samples); t38_terminal_send_timeout(pvt->t38_state, samples);
} }
} }
@ -451,6 +451,7 @@ static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uin
for (x = 0; x < count; x++) { for (x = 0; x < count; x++) {
if (switch_core_session_write_frame(session, &out_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) { if (switch_core_session_write_frame(session, &out_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "INVALID WRITE: %d:%d\n", out_frame.packetlen, count);
r = -1; r = -1;
break; break;
} }
@ -461,14 +462,16 @@ static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uin
if (r < 0) { if (r < 0) {
t30_state_t *t30; t30_state_t *t30;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "TERMINATING T30 STATE\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "TERMINATING T30 STATE\n");
if (pvt->t38_state && (t30 = t38_terminal_get_t30_state(pvt->t38_state))) { if (pvt->t38_state && (t30 = t38_terminal_get_t30_state(pvt->t38_state))) {
t30_terminate(t30); t30_terminate(t30);
} }
switch_yield(10000);
} }
return r < 0 ? r : 0;
return r;
} }
static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode) static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)