Added a free space function to the T.31 modem in spandsp, so the app doesn't

need to probe around inside the modem.
This commit is contained in:
Steve Underwood
2012-09-04 08:58:43 +08:00
committed by Ken Rice
parent 3a4440ee68
commit a2bb0dea4e
4 changed files with 16 additions and 4 deletions
@@ -1279,7 +1279,7 @@ static void *SWITCH_THREAD_FUNC modem_thread(switch_thread_t *thread, void *obj)
modem->last_event = switch_time_now();
}
avail = sizeof(buf) - modem->t31_state->tx.in_bytes + modem->t31_state->tx.out_bytes - 1;
avail = t31_at_rx_free_space(modem->t31_state);
if (avail == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Buffer Full, retrying....\n");