freetdm: Added some code to differentiate between wanpipe_wait returning FTDM_TIMEOUT and FTDM_FAIL on transmit

This commit is contained in:
David Yat Sin 2011-10-31 10:25:07 -04:00
parent 50328a6634
commit 5ee015610c
1 changed files with 10 additions and 3 deletions

View File

@ -897,12 +897,19 @@ int16_t sngisdn_rcv_l1_data_req(uint16_t spId, sng_l1_frame_t *l1_frame)
do {
flags = FTDM_WRITE;
status = signal_data->dchan->fio->wait(signal_data->dchan, &flags, 1000);
if (status != FTDM_SUCCESS) {
ftdm_log_chan_msg(signal_data->dchan, FTDM_LOG_WARNING, "transmit timed-out\n");
return -1;
switch(status) {
case FTDM_SUCCESS:
break;
case FTDM_TIMEOUT:
continue;
case FTDM_FAIL:
default:
ftdm_log_chan_msg(signal_data->dchan, FTDM_LOG_WARNING, "failed to poll for channel\n");
return -1;
}
/* status = FTDM_SUCCESS */
if ((flags & FTDM_WRITE)) {
#if 0
int i;