freetdm: only handle zt events when FTDM_CHANNEL_EVENT is set

This commit is contained in:
Moises Silva 2011-01-06 14:54:19 -05:00
parent 81f01f0ee7
commit 3018400461

View File

@ -1131,7 +1131,6 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event)
ftdm_channel_t *fchan = span->channels[i];
if (ftdm_test_flag(fchan, FTDM_CHANNEL_EVENT)) {
ftdm_clear_flag(fchan, FTDM_CHANNEL_EVENT);
}
if (ioctl(fchan->sockfd, codes.GETEVENT, &zt_event_id) == -1) {
snprintf(span->last_error, sizeof(span->last_error), "%s", strerror(errno));
return FTDM_FAIL;
@ -1152,6 +1151,7 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event)
*event = &span->event_header;
return FTDM_SUCCESS;
}
}
return FTDM_FAIL;
}