dahdi-base: Minor maint mode error
The previous maint state was saved regardless if the base driver returned an error or not. This caused strange behavior in dahdi tools. Moved the maint state save to after the switch case to reflect this. https://issues.asterisk.org/jira/browse/DAHDI-984 Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10718 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
fe791b5b02
commit
6c02c3c156
@ -5188,8 +5188,7 @@ static int dahdi_ioctl_maint(unsigned long data)
|
|||||||
spin_lock_irqsave(&s->lock, flags);
|
spin_lock_irqsave(&s->lock, flags);
|
||||||
/* save current maint state */
|
/* save current maint state */
|
||||||
i = s->maintstat;
|
i = s->maintstat;
|
||||||
/* set maint mode */
|
|
||||||
s->maintstat = maint.command;
|
|
||||||
switch (maint.command) {
|
switch (maint.command) {
|
||||||
case DAHDI_MAINT_NONE:
|
case DAHDI_MAINT_NONE:
|
||||||
case DAHDI_MAINT_LOCALLOOP:
|
case DAHDI_MAINT_LOCALLOOP:
|
||||||
@ -5248,6 +5247,10 @@ static int dahdi_ioctl_maint(unsigned long data)
|
|||||||
put_span(s);
|
put_span(s);
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set maint mode */
|
||||||
|
s->maintstat = maint.command;
|
||||||
|
|
||||||
dahdi_alarm_notify(s); /* process alarm-related events */
|
dahdi_alarm_notify(s); /* process alarm-related events */
|
||||||
spin_unlock_irqrestore(&s->lock, flags);
|
spin_unlock_irqrestore(&s->lock, flags);
|
||||||
put_span(s);
|
put_span(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user