ftmod_libpri: Skip channels marked in use during NT-mode idle restart.
Channels can be in DOWN state but reserved by an incoming call (FTDM_CHANNEL_INUSE flag). Additionally check the flag in on_timeout_t3xx() and skip those channels. Reported-by: privi #freetdm @ irc.freenode.net Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
c0e4ca47bc
commit
a478a5de04
|
@ -1938,7 +1938,7 @@ static int on_timeout_t3xx(struct lpwrap_pri *spri, struct lpwrap_timer *timer)
|
|||
if (ftdm_channel_get_type(cur) != FTDM_CHAN_TYPE_B)
|
||||
continue;
|
||||
/* Restart idle b-channels */
|
||||
if (ftdm_channel_get_state(cur) == FTDM_CHANNEL_STATE_DOWN) {
|
||||
if (ftdm_channel_get_state(cur) == FTDM_CHANNEL_STATE_DOWN && !ftdm_test_flag(cur, FTDM_CHANNEL_INUSE)) {
|
||||
ftdm_set_state_locked(cur, FTDM_CHANNEL_STATE_RESTART);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue