diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-10-24 19:51:33 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-10-24 19:51:33 +0000 |
commit | 3d4261ec70978e7ca4dd833b5c913c64771efd7c (patch) | |
tree | 21dcdd91212427501ee8a0efee91e2ae00cede88 | |
parent | 5d65033efcc9841323d9ca6e892017199b7341d3 (diff) |
Increase max buffer size
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@258 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | zaptel.c | 2 | ||||
-rwxr-xr-x | zaptel.h | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -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))) @@ -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 |