From f4c1b037d3e63be42c574ca9753a685dd9e79c60 Mon Sep 17 00:00:00 2001 From: qwell Date: Wed, 22 Aug 2007 21:01:14 +0000 Subject: Don't try to create devices 250 and above in udev. Issue 10522, fix found by me (but I'm not going to take credit for the code, since it already existed in trunk for some reason) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2936 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel-base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'zaptel-base.c') diff --git a/zaptel-base.c b/zaptel-base.c index b4f429a..e10540a 100644 --- a/zaptel-base.c +++ b/zaptel-base.c @@ -4595,8 +4595,10 @@ int zt_register(struct zt_span *span, int prefmaster) #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 */ -- cgit v1.2.3