freetdm: * Avoid acquiring the span mutex if the pendingchans queue is available for use *

* FreeTDM modules using the old FTDM_SPAN_STATE_CHANGE flag should be updated   *
         * until then, they are still vulnerable to deadlock situations                  *
         * Modules pending update: (ftmod_analog, ftmod_libpri, ftmod_isdn)              *
         * Fixes Sangoma redmine ticket #1791 0 FTDM span stop deadlock                  *
This commit is contained in:
Moises Silva
2011-10-24 12:43:54 -04:00
parent 4aa0285a22
commit d79f95f2d6
2 changed files with 16 additions and 3 deletions

View File

@@ -173,6 +173,12 @@ typedef enum {
FTDM_SPAN_SUSPENDED = (1 << 3),
FTDM_SPAN_IN_THREAD = (1 << 4),
FTDM_SPAN_STOP_THREAD = (1 << 5),
/*! Signaling modules set this flag to use fchan->pendingchans queue instead
* of the FTDM_SPAN_STATE_CHANGE flag to detect when there is channels with
* a state change pending in the span. If you set this member you can't rely
* on FTDM_SPAN_STATE_CHANGE anymore and must use the queue only instead. This
* is the new way of detecting state changes, new modules should always set this
* flag, the old modules still relying on FTDM_SPAN_STATE_CHANGE should be updated */
FTDM_SPAN_USE_CHAN_QUEUE = (1 << 6),
FTDM_SPAN_SUGGEST_CHAN_ID = (1 << 7),
FTDM_SPAN_USE_AV_RATE = (1 << 8),