[zaptel-commits] sruffell: branch 1.4 r4567 - /branches/1.4/kernel/zaptel-base.c
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Wed Oct 15 13:57:02 CDT 2008
Author: sruffell
Date: Wed Oct 15 13:57:01 2008
New Revision: 4567
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4567
Log:
Zaptel should always notify user mode whenever it has received buffers to
process.
Modified:
branches/1.4/kernel/zaptel-base.c
Modified: branches/1.4/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/zaptel-base.c?view=diff&rev=4567&r1=4566&r2=4567
==============================================================================
--- branches/1.4/kernel/zaptel-base.c (original)
+++ branches/1.4/kernel/zaptel-base.c Wed Oct 15 13:57:01 2008
@@ -886,7 +886,7 @@
else
ss->txdisable = 0;
- if (ss->rxbufpolicy == ZT_POLICY_WHEN_FULL)
+ if (ss->rebufpolicy == ZT_POLICY_WHEN_FULL)
ss->rxdisable = 1;
else
ss->rxdisable = 0;
@@ -4186,7 +4186,13 @@
return -EINVAL;
if (stack.bi.bufsize * stack.bi.numbufs > ZT_MAX_BUF_SPACE)
return -EINVAL;
- chan->rxbufpolicy = stack.bi.rxbufpolicy & 0x1;
+
+ /* It does not make sense to allow user mode to change the
+ * receive buffering policy. Zaptel always provides received
+ * buffers to upper layers immediately. Transmission is
+ * different since we might want to allow the kernel to build
+ * up a bufer in order to prevent underruns from interrupt
+ * context. */
chan->txbufpolicy = stack.bi.txbufpolicy & 0x1;
if ((rv = zt_reallocbufs(chan, stack.bi.bufsize, stack.bi.numbufs)))
return (rv);
More information about the zaptel-commits
mailing list