[dahdi-commits] tzafrir: branch linux/tzafrir/sysfs r7866 - in /linux/team/tzafrir/sysfs: ./ ...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jan 11 11:39:33 CST 2010
Author: tzafrir
Date: Mon Jan 11 11:39:29 2010
New Revision: 7866
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7866
Log:
Merged revisions 7850 via svnmerge from
https://origsvn.digium.com/svn/dahdi/linux/trunk
........
r7850 | tzafrir | 2010-01-11 16:50:04 +0200 (Mon, 11 Jan 2010) | 2 lines
Fail gracefully if we already have more than 1024 channels.
........
Modified:
linux/team/tzafrir/sysfs/ (props changed)
linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-base.c
Propchange: linux/team/tzafrir/sysfs/
------------------------------------------------------------------------------
automerge = YES
Propchange: linux/team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 11 11:39:29 2010
@@ -1,1 +1,1 @@
-/linux/trunk:1-7848
+/linux/trunk:1-7855
Modified: linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-base.c?view=diff&rev=7866&r1=7865&r2=7866
==============================================================================
--- linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/tzafrir/sysfs/drivers/dahdi/dahdi-base.c Mon Jan 11 11:39:29 2010
@@ -5777,7 +5777,12 @@
for (x = 0; x < span->channels; x++) {
span->chans[x]->span = span;
- dahdi_chan_reg(span->chans[x]);
+ res = dahdi_chan_reg(span->chans[x]);
+ if (res) {
+ for (x--; x >= 0; x--)
+ dahdi_chan_unreg(span->chans[x]);
+ goto unreg_channels;
+ }
}
res = span_sysfs_create(span);
@@ -5827,6 +5832,12 @@
//span->chans[x]->span = NULL; /* FIXME: Required? */
}
span->flags &= DAHDI_FLAG_REGISTERED;
+ /* FIXME: making dahdi_chan_unreg safe for usage on an
+ * unregistereg channel will avoid this duplication. */
+ for (x = 0; x < span->channels; x++)
+ dahdi_chan_unreg(span->chans[x]);
+unreg_channels:
+ spans[span->spanno] = NULL;
return res;
}
More information about the dahdi-commits
mailing list