freetdm: removed wrong main loop code
This commit is contained in:
parent
03dc3b7b8d
commit
a5d53b8a38
|
@ -847,7 +847,7 @@ static int ftdm_r2_io_get_oob_event(openr2_chan_t *r2chan, openr2_oob_event_t *e
|
||||||
*event = OR2_OOB_EVENT_NONE;
|
*event = OR2_OOB_EVENT_NONE;
|
||||||
status = ftdm_channel_read_event(ftdmchan, &fevent);
|
status = ftdm_channel_read_event(ftdmchan, &fevent);
|
||||||
if (status != FTDM_SUCCESS) {
|
if (status != FTDM_SUCCESS) {
|
||||||
//ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "failed to retrieve freetdm event!\n");
|
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, "failed to retrieve freetdm event!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (fevent->e_type != FTDM_EVENT_OOB)
|
if (fevent->e_type != FTDM_EVENT_OOB)
|
||||||
|
@ -1412,34 +1412,12 @@ static void *ftdm_r2_run(ftdm_thread_t *me, void *obj)
|
||||||
r2call = R2CALL(ftdmchan);
|
r2call = R2CALL(ftdmchan);
|
||||||
ftdmchan = openr2_chan_get_client_data(r2chan);
|
ftdmchan = openr2_chan_get_client_data(r2chan);
|
||||||
|
|
||||||
status = ftdm_channel_read_event(ftdmchan, &event);
|
|
||||||
ftdm_mutex_lock(ftdmchan->mutex);
|
ftdm_mutex_lock(ftdmchan->mutex);
|
||||||
if (status == FTDM_SUCCESS) {
|
ftdm_r2_state_advance(ftdmchan);
|
||||||
switch (event->enum_id) {
|
|
||||||
case FTDM_OOB_CAS_BITS_CHANGE:
|
|
||||||
{
|
|
||||||
ftdm_log(FTDM_LOG_DEBUG, "Handling CAS on channel %d.\n", i);
|
|
||||||
openr2_chan_process_cas_signaling(r2chan);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case FTDM_OOB_ALARM_TRAP:
|
|
||||||
case FTDM_OOB_ALARM_CLEAR:
|
|
||||||
{
|
|
||||||
ftdm_log(FTDM_LOG_DEBUG, "OOB EVENT: %s\n", ftdm_signal_event2str(event->enum_id));
|
|
||||||
openr2_chan_process_oob_events(r2chan);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ftdm_r2_state_advance(ftdmchan)) {
|
|
||||||
ftdm_mutex_unlock(ftdmchan->mutex);
|
|
||||||
}
|
|
||||||
openr2_chan_process_signaling(r2chan);
|
openr2_chan_process_signaling(r2chan);
|
||||||
if (!ftdm_r2_state_advance(ftdmchan)) {
|
ftdm_r2_state_advance(ftdmchan);
|
||||||
ftdm_mutex_unlock(ftdmchan->mutex);
|
ftdm_mutex_unlock(ftdmchan->mutex);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ftdm_span_trigger_signals(span);
|
ftdm_span_trigger_signals(span);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue