xpp: bugfix: clear NOTOPEN span alarm on assign
The NOTOPEN span alarm flag is set at span unassignment time. * It needs to be cleared when the span is reassigned. * That is: only if the span is actually connected. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10302 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
e74fb7d04d
commit
0c89cad864
@ -863,6 +863,7 @@ static const struct dahdi_span_ops BRI_span_ops = {
|
||||
.maint = xpp_maint,
|
||||
.echocan_create = xpp_echocan_create,
|
||||
.echocan_name = xpp_echocan_name,
|
||||
.assigned = xpp_span_assigned,
|
||||
#ifdef DAHDI_SYNC_TICK
|
||||
.sync_tick = dahdi_sync_tick,
|
||||
#endif
|
||||
|
@ -1242,6 +1242,7 @@ static const struct dahdi_span_ops PRI_span_ops = {
|
||||
.maint = xpp_maint,
|
||||
.echocan_create = xpp_echocan_create,
|
||||
.echocan_name = xpp_echocan_name,
|
||||
.assigned = xpp_span_assigned,
|
||||
#ifdef DAHDI_SYNC_TICK
|
||||
.sync_tick = dahdi_sync_tick,
|
||||
#endif
|
||||
|
@ -945,6 +945,19 @@ int xpp_echocan_create(struct dahdi_chan *chan,
|
||||
}
|
||||
EXPORT_SYMBOL(xpp_echocan_create);
|
||||
|
||||
void xpp_span_assigned(struct dahdi_span *span)
|
||||
{
|
||||
struct phonedev *phonedev = container_of(span, struct phonedev, span);
|
||||
xpd_t *xpd = container_of(phonedev, struct xpd, phonedev);
|
||||
|
||||
XPD_INFO(xpd, "Span assigned: %d\n", span->spanno);
|
||||
if (xpd->card_present) {
|
||||
span->alarms &= ~DAHDI_ALARM_NOTOPEN;
|
||||
dahdi_alarm_notify(&phonedev->span);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(xpp_span_assigned);
|
||||
|
||||
static const struct dahdi_span_ops xpp_span_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = xpp_open,
|
||||
@ -953,6 +966,7 @@ static const struct dahdi_span_ops xpp_span_ops = {
|
||||
.maint = xpp_maint,
|
||||
.echocan_create = xpp_echocan_create,
|
||||
.echocan_name = xpp_echocan_name,
|
||||
.assigned = xpp_span_assigned,
|
||||
};
|
||||
|
||||
static const struct dahdi_span_ops xpp_rbs_span_ops = {
|
||||
@ -964,6 +978,7 @@ static const struct dahdi_span_ops xpp_rbs_span_ops = {
|
||||
.maint = xpp_maint,
|
||||
.echocan_create = xpp_echocan_create,
|
||||
.echocan_name = xpp_echocan_name,
|
||||
.assigned = xpp_span_assigned,
|
||||
};
|
||||
|
||||
void xpd_set_spanname(xpd_t *xpd)
|
||||
|
@ -47,6 +47,7 @@ int xpp_close(struct dahdi_chan *chan);
|
||||
int xpp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long arg);
|
||||
int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig);
|
||||
int xpp_maint(struct dahdi_span *span, int cmd);
|
||||
void xpp_span_assigned(struct dahdi_span *span);
|
||||
void report_bad_ioctl(const char *msg, xpd_t *xpd, int pos, unsigned int cmd);
|
||||
int total_registered_spans(void);
|
||||
void oht_pcm(xpd_t *xpd, int pos, bool pass);
|
||||
|
Loading…
Reference in New Issue
Block a user