summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-10-24 19:51:33 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-10-24 19:51:33 +0000
commit3d4261ec70978e7ca4dd833b5c913c64771efd7c (patch)
tree21dcdd91212427501ee8a0efee91e2ae00cede88
parent5d65033efcc9841323d9ca6e892017199b7341d3 (diff)
Increase max buffer size
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@258 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xzaptel.c2
-rwxr-xr-xzaptel.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/zaptel.c b/zaptel.c
index 4fc7da6..b5589d1 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -3049,6 +3049,8 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign
return -EINVAL;
if (bi.bufsize < 16)
return -EINVAL;
+ if (bi.bufsize * bi.numbufs > ZT_MAX_BUF_SPACE)
+ return -EINVAL;
chan->rxbufpolicy = bi.rxbufpolicy & 0x1;
chan->txbufpolicy = bi.txbufpolicy & 0x1;
if ((rv = zt_reallocbufs(chan, bi.bufsize, bi.numbufs)))
diff --git a/zaptel.h b/zaptel.h
index ca02dae..ebe4bea 100755
--- a/zaptel.h
+++ b/zaptel.h
@@ -118,7 +118,8 @@
#define ZT_MAX_BLOCKSIZE 8192
#define ZT_DEFAULT_NUM_BUFS 2
-#define ZT_MAX_NUM_BUFS 8
+#define ZT_MAX_NUM_BUFS 32
+#define ZT_MAX_BUF_SPACE 32768
#define ZT_DEFAULT_BLOCKSIZE 1024
#define ZT_DEFAULT_MTR_MRU 2048