diff options
Diffstat (limited to 'pciradio.c')
-rwxr-xr-x | pciradio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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')))) |