summaryrefslogtreecommitdiff
path: root/zaptel-base.c
diff options
context:
space:
mode:
authorqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-22 21:01:14 +0000
committerqwell <qwell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-22 21:01:14 +0000
commitf4c1b037d3e63be42c574ca9753a685dd9e79c60 (patch)
treead8980d4e48dcc5fc8ba7259fc66eb97415d527d /zaptel-base.c
parent0396c40aa67f40c5f873eb56c30fded6d30b87f8 (diff)
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
Diffstat (limited to 'zaptel-base.c')
-rw-r--r--zaptel-base.c6
1 files changed, 4 insertions, 2 deletions
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 */