summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMakefile5
-rwxr-xr-xzaptel.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b3de148..7f719e4 100755
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@ DEVFS=$(shell ps ax | grep -v grep | grep devfsd)
TZOBJS=zonedata.lo tonezone.lo
LIBTONEZONE=libtonezone.so.1.0
MODULES=zaptel.o tor2.o torisa.o wcusb.o wcfxo.o wcfxs.o \
- ztdynamic.o ztd-eth.o wct1xxp.o wct4xxp.o # ztdummy.o
+ ztdynamic.o ztd-eth.o wct1xxp.o wct4xxp.o wcs3200p.o # ztdummy.o
#MODULES+=wcfxsusb.o
ZTTOOL=$(shell if [ -f /usr/include/newt.h ]; then echo zttool; fi)
#PRIMARY=wcfxsusb
@@ -127,6 +127,9 @@ wct4xxp.o:wct4xxp.c zaptel.h
wcfxs.o:wcfxs.c zaptel.h
gcc $(KFLAGS) -c wcfxs.c
+wcs3200p.o:wcs3200p.c zaptel.h
+ gcc $(KFLAGS) -c wcs3200p.c
+
ztdummy.o:ztdummy.c ztdummy.h
gcc $(KFLAGS) -c ztdummy.c
diff --git a/zaptel.c b/zaptel.c
index 449018b..c775817 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -2019,13 +2019,16 @@ static int zt_open(struct inode *inode, struct file *file)
if (unit == 254)
return zt_chan_open(inode, file);
if (unit == 255) {
- chan = zt_alloc_pseudo();
- if (chan) {
- file->private_data = chan;
- return zt_specchan_open(inode, file, chan->channo, 1);
- } else {
+ if (maxspans) {
+ chan = zt_alloc_pseudo();
+ if (chan) {
+ file->private_data = chan;
+ return zt_specchan_open(inode, file, chan->channo, 1);
+ } else {
+ return -ENXIO;
+ }
+ } else
return -ENXIO;
- }
}
return zt_specchan_open(inode, file, unit, 1);
}