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

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9317

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9659 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell
2011-01-21 05:28:05 +00:00
parent 2bd36973c3
commit b77bc833bc

View File

@@ -4221,6 +4221,11 @@ static int dahdi_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long da
return 0;
case DAHDI_SHUTDOWN:
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)
res = spans[j]->ops->shutdown(spans[j]);
spans[j]->flags &= ~DAHDI_FLAG_RUNNING;