[svn-commits] mattf: trunk r2542 - /trunk/zaptel.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri May 18 09:21:21 MST 2007
Author: mattf
Date: Fri May 18 11:21:20 2007
New Revision: 2542
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2542
Log:
Let's not overload our minor numbers. Fixes error on unload on systems with more than 250 devices.
Modified:
trunk/zaptel.c
Modified: trunk/zaptel.c
URL: http://svn.digium.com/view/zaptel/trunk/zaptel.c?view=diff&rev=2542&r1=2541&r2=2542
==============================================================================
--- trunk/zaptel.c (original)
+++ trunk/zaptel.c Fri May 18 11:21:20 2007
@@ -4720,8 +4720,10 @@
#ifdef CONFIG_ZAP_UDEV
for (x = 0; x < span->channels; x++) {
char chan_name[50];
- sprintf(chan_name, "zap%d", span->chans[x].channo);
- CLASS_DEV_CREATE(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
+ if (span->chans[x].channo < 250) {
+ sprintf(chan_name, "zap%d", span->chans[x].channo);
+ CLASS_DEV_CREATE(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
+ }
}
#endif /* CONFIG_ZAP_UDEV */
@@ -4774,7 +4776,8 @@
#ifdef CONFIG_ZAP_UDEV
for (x = 0; x < span->channels; x++) {
- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
+ if (span->chans[x].channo < 250)
+ class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
}
#endif /* CONFIG_ZAP_UDEV */
More information about the svn-commits
mailing list