[dahdi-commits] sruffell: linux/trunk r9935 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Jun 2 15:01:14 CDT 2011
Author: sruffell
Date: Thu Jun 2 15:01:10 2011
New Revision: 9935
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9935
Log:
dahdi: Propagate shutdown returncode to user space.
This change fixes a condition where 'dahdi_cfg -s' would always return
success regardless of whether a board driver was able to complete the
shutdown. Only impacts board drivers that implemented the shutdown span
callback.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9935&r1=9934&r2=9935
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Jun 2 15:01:10 2011
@@ -4754,7 +4754,6 @@
{
/* I/O CTL's for control interface */
int j;
- int res = 0;
int x;
struct dahdi_span *s;
@@ -4768,8 +4767,14 @@
for (x = 0; x < s->channels; x++)
s->chans[x]->sig = 0;
- if (s->ops->shutdown)
- res = s->ops->shutdown(s);
+ if (s->ops->shutdown) {
+ int res = s->ops->shutdown(s);
+ if (res) {
+ put_span(s);
+ return res;
+ }
+ }
+
s->flags &= ~DAHDI_FLAG_RUNNING;
put_span(s);
return 0;
More information about the dahdi-commits
mailing list