[dahdi-commits] fjoe: freebsd/trunk r7822 - in /freebsd/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Sun Jan 10 07:31:26 CST 2010


Author: fjoe
Date: Sun Jan 10 07:31:22 2010
New Revision: 7822

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7822
Log:
Fix panic on span reconfiguration: destroy channel devices properly.

Modified:
    freebsd/trunk/drivers/dahdi/dahdi-base.c
    freebsd/trunk/include/dahdi/kernel.h

Modified: freebsd/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=7822&r1=7821&r2=7822
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi-base.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi-base.c Sun Jan 10 07:31:22 2010
@@ -6163,11 +6163,11 @@
 	for (x = 0; x < span->channels; x++) {
 		if (span->chans[x]->channo < 250) {
 #if defined(__FreeBSD__)
-			span->chans[x]->file = make_dev(
+			span->chans[x]->dev = make_dev(
 			    &dahdi_devsw, span->chans[x]->channo,
 			    UID_ROOT, GID_WHEEL, 0644,
 			    "dahdi/%d", span->chans[x]->channo);
-			dev_depends(dev_ctl, span->chans[x]->file);
+			dev_depends(dev_ctl, span->chans[x]->dev);
 #else
 			char chan_name[32];
 			snprintf(chan_name, sizeof(chan_name), "dahdi!%d", 
@@ -6235,9 +6235,9 @@
 	for (x = 0; x < span->channels; x++) {
 		if (span->chans[x]->channo < 250) {
 #if defined(__FreeBSD__)
-			if (span->chans[x]->file != NULL) {
-				destroy_dev(span->chans[x]->file);
-				span->chans[x]->file = NULL;
+			if (span->chans[x]->dev != NULL) {
+				destroy_dev(span->chans[x]->dev);
+				span->chans[x]->dev = NULL;
 			}
 #else
 			CLASS_DEV_DESTROY(dahdi_class, MKDEV(DAHDI_MAJOR, span->chans[x]->channo));

Modified: freebsd/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/include/dahdi/kernel.h?view=diff&rev=7822&r1=7821&r2=7822
==============================================================================
--- freebsd/trunk/include/dahdi/kernel.h (original)
+++ freebsd/trunk/include/dahdi/kernel.h Sun Jan 10 07:31:22 2010
@@ -467,7 +467,8 @@
 	/* Specified by driver, readable by DAHDI */
 	void *pvt;			/*!< Private channel data */
 #if defined(__FreeBSD__)
-	struct cdev *file;	/*!< Device structure */
+	struct cdev *dev;	/*!< Device structure */
+	struct cdev *file;	/*!< File structure */
 #else
 	struct file *file;	/*!< File structure */
 #endif




More information about the dahdi-commits mailing list