freetdm: add debugging msgs for zt wait errors
This commit is contained in:
parent
b0e622987a
commit
46a9fa3910
|
@ -657,7 +657,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||||
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, chunk);
|
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, chunk);
|
||||||
|
|
||||||
if (status == FTDM_FAIL) {
|
if (status == FTDM_FAIL) {
|
||||||
ftdm_log(FTDM_LOG_WARNING, "failed to wait for I/O\n");
|
ftdm_log(FTDM_LOG_ERROR, "Failed to wait for I/O\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -889,6 +889,7 @@ static FIO_WAIT_FUNCTION(zt_wait)
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
|
|
||||||
if (pfds[0].revents & POLLERR) {
|
if (pfds[0].revents & POLLERR) {
|
||||||
|
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "DAHDI device got POLLERR\n");
|
||||||
result = -1;
|
result = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -900,6 +901,7 @@ static FIO_WAIT_FUNCTION(zt_wait)
|
||||||
|
|
||||||
if (result < 0){
|
if (result < 0){
|
||||||
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "Poll failed");
|
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "Poll failed");
|
||||||
|
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed to poll DAHDI device: %s\n", strerror(errno));
|
||||||
return FTDM_FAIL;
|
return FTDM_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue