summaryrefslogtreecommitdiff
path: root/pciradio.c
diff options
context:
space:
mode:
Diffstat (limited to 'pciradio.c')
-rwxr-xr-xpciradio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pciradio.c b/pciradio.c
index 4702a6e..c896045 100755
--- a/pciradio.c
+++ b/pciradio.c
@@ -1254,10 +1254,10 @@ static int pciradio_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long
rad->srxtimer = 0;
memset(stack.p.buf,0,SERIAL_BUFLEN);
stack.p.index = 0;
- for(;;)
+ if (stack.p.data) for(;;)
{
rad->rxbuf[rad->rxindex] = 0;
- if (((!stack.p.data) || (rad->rxindex < stack.p.data)) &&
+ if ((rad->rxindex < stack.p.data) &&
(rad->srxtimer < SRX_TIMEOUT) &&
((rad->remmode[chan->chanpos - 1] == ZT_RADPAR_REM_SERIAL) ||
(!strchr(rad->rxbuf,'\r'))))