summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-15 13:35:13 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-15 13:35:13 +0000
commit51f6b1e183d8d1e1ad6eea8c06d621293790c4ab (patch)
tree3e1ee640f3702daf3a126e85caea6b9e6b3ed4a2 /zaptel.c
parentf86194b6c68a7792340252eaee28e8d9b0b03586 (diff)
Same for timer -- don't open if no devs
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@232 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/zaptel.c b/zaptel.c
index c775817..fa988a7 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -2014,8 +2014,13 @@ static int zt_open(struct inode *inode, struct file *file)
/* Minor 0: Special "control" descriptor */
if (!unit)
return zt_ctl_open(inode, file);
- if (unit == 253)
- return zt_timing_open(inode, file);
+ if (unit == 253) {
+ if (maxspans) {
+ return zt_timing_open(inode, file);
+ } else {
+ return -ENXIO;
+ }
+ }
if (unit == 254)
return zt_chan_open(inode, file);
if (unit == 255) {