dahdi_dynamic_loc: Do not call dahdi_dynamic_receive on peers before reg.
It's possible for dahdi_dynamic_loc spans to be "peered" before the dahdi_span is fully register. Do not call dahdi_dynamic_receive on any peers before they are fully registered. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9566 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
08eb1a560d
commit
56a6e402ae
@ -82,10 +82,17 @@ dahdi_dynamic_local_transmit(void *pvt, unsigned char *msg, int msglen)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&local_lock, flags);
|
||||
if (d->peer && d->peer->span)
|
||||
dahdi_dynamic_receive(d->peer->span, msg, msglen);
|
||||
if (d->monitor_rx_peer && d->monitor_rx_peer->span)
|
||||
dahdi_dynamic_receive(d->monitor_rx_peer->span, msg, msglen);
|
||||
if (d->peer && d->peer->span) {
|
||||
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &d->peer->span->flags))
|
||||
dahdi_dynamic_receive(d->peer->span, msg, msglen);
|
||||
}
|
||||
if (d->monitor_rx_peer && d->monitor_rx_peer->span) {
|
||||
if (test_bit(DAHDI_FLAGBIT_REGISTERED,
|
||||
&d->monitor_rx_peer->span->flags)) {
|
||||
dahdi_dynamic_receive(d->monitor_rx_peer->span,
|
||||
msg, msglen);
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&local_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user