summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-02-02 19:28:40 +0000
committerShaun Ruffell <sruffell@digium.com>2011-02-02 19:28:40 +0000
commitca160497906a8443c11d6c7075fb59436ab5acb5 (patch)
treeb9626c3ac5f0e53c38467c2baac4353003c14efb
parent4e314aee570302d2eda2461e39e8e60e4a921f39 (diff)
dahdi: Analog spans do not have to be marked RUNNING to become master.
Fixes a regression introduced in r9611. Analog spans would never become the master since the SPANSTART ioctl is not typically called on them, and therefore they were never marked RUNNING. The result could be audio problems. I'm marking this as related to issue 13205 since it's generally all related to how should the drivers select which span is the master. I also mark as related to issue 16165 because the problems experienced are a result of the same fundamental issue. (issue #13205)(issue #16165) Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9729 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi-base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 60d690b..01bee57 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -3595,6 +3595,11 @@ void dahdi_alarm_channel(struct dahdi_chan *chan, int alarms)
spin_unlock_irqrestore(&chan->lock, flags);
}
+static inline bool is_analog_span(const struct dahdi_span *s)
+{
+ return (s->linecompat == 0);
+}
+
static void __dahdi_find_master_span(void)
{
struct dahdi_span *s;
@@ -3606,7 +3611,8 @@ static void __dahdi_find_master_span(void)
list_for_each_entry(s, &span_list, node) {
if (s->alarms)
continue;
- if (!test_bit(DAHDI_FLAGBIT_RUNNING, &s->flags))
+ if (!is_analog_span(s) &&
+ !test_bit(DAHDI_FLAGBIT_RUNNING, &s->flags))
continue;
if (!can_provide_timing(s))
continue;