dahdi-base: All channels for a span are now unconfigured on shutdown

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9317 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Kinsey Moore 2010-09-10 15:54:36 +00:00
parent 973d576ad8
commit 048634fc5f

View File

@ -4223,6 +4223,11 @@ static int dahdi_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long da
return 0; return 0;
case DAHDI_SHUTDOWN: case DAHDI_SHUTDOWN:
CHECK_VALID_SPAN(j); CHECK_VALID_SPAN(j);
/* Unconfigure channels */
for (x = 0; x < spans[j]->channels; x++)
spans[j]->chans[x]->sig = 0;
if (spans[j]->ops->shutdown) if (spans[j]->ops->shutdown)
res = spans[j]->ops->shutdown(spans[j]); res = spans[j]->ops->shutdown(spans[j]);
spans[j]->flags &= ~DAHDI_FLAG_RUNNING; spans[j]->flags &= ~DAHDI_FLAG_RUNNING;