freetdm: ftmod_zt - clear FTDM_CHANNEL_EVENT flag on zt_channel_next_event when set,
but retrieve event from channel even when it's not
This commit is contained in:
parent
723a598c24
commit
a3ea8a8f20
|
@ -1006,6 +1006,8 @@ FIO_CHANNEL_NEXT_EVENT_FUNCTION(zt_channel_next_event)
|
|||
|
||||
if (ftdm_test_flag(ftdmchan, FTDM_CHANNEL_EVENT)) {
|
||||
ftdm_clear_flag(ftdmchan, FTDM_CHANNEL_EVENT);
|
||||
}
|
||||
|
||||
if (ioctl(ftdmchan->sockfd, codes.GETEVENT, &zt_event_id) == -1) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed retrieving event from channel: %s\n",
|
||||
strerror(errno));
|
||||
|
@ -1091,9 +1093,6 @@ FIO_CHANNEL_NEXT_EVENT_FUNCTION(zt_channel_next_event)
|
|||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieves an event from a ftdmtel span
|
||||
* \param span Span to retrieve event from
|
||||
|
|
Loading…
Reference in New Issue