Skip to content
Permalink
Browse files

Only look at lower 16 bits of FreeTDM channel numbers

FreeTDM sets some higher-ordre bits in the channel number to indicate
certain situations.  The actual channel number in the E1 multiplex
is still only in the bottom 16 bits.
  • Loading branch information
Harald Welte
Harald Welte committed Dec 28, 2019
1 parent f999022 commit 5621e2a5edbbeec910988eca9446186f19790ab8
Showing with 1 addition and 0 deletions.
  1. +1 −0 libs/freetdm/src/ftdm_io.c
@@ -2446,6 +2446,7 @@ FT_DECLARE(ftdm_caller_data_t *) ftdm_channel_get_caller_data(ftdm_channel_t *ft
FT_DECLARE(ftdm_channel_t *) ftdm_span_get_channel(const ftdm_span_t *span, uint32_t chanid)
{
ftdm_channel_t *chan;
chanid &= 0xffff; /* mask off libpri "ds1_explicit" bit & co */
ftdm_mutex_lock(span->mutex);
if (chanid == 0 || chanid > span->chan_count) {
ftdm_mutex_unlock(span->mutex);

0 comments on commit 5621e2a

Please sign in to comment.
You can’t perform that action at this time.