207 |
|
if (n) /* read past end? */ |
208 |
|
error(INTERNAL, "packet sync error in get_packets"); |
209 |
|
/* take from queue */ |
210 |
< |
if (pldone = NULL) |
210 |
> |
if (pldone == NULL) |
211 |
|
pldone = plend = pqueue[pn]; |
212 |
|
else |
213 |
|
plend->next = pqueue[pn]; |
252 |
|
if (pqlen[i]) { |
253 |
|
if (rpdone == NULL) { /* tack on queue */ |
254 |
|
rpdone = rpl = pqueue[i]; |
255 |
< |
n = rpl->nr; |
255 |
> |
nr = rpl->nr; |
256 |
|
} else { |
257 |
|
rpl->next = pqueue[i]; |
258 |
< |
n = 0; |
258 |
> |
nr = 0; |
259 |
|
} |
260 |
< |
while (rpl->next != NULL) |
261 |
< |
n += (rpl = rpl->next)->nr; |
260 |
> |
while (rpl->next != NULL) { |
261 |
> |
nr += (rpl = rpl->next)->nr; |
262 |
> |
if (rpl->nr < RPACKSIZ) |
263 |
> |
nr++; /* add flush block */ |
264 |
> |
} |
265 |
|
n = readbuf(rtpd[i][0], (char *)rtbuf, |
266 |
< |
4*sizeof(float)*n); |
266 |
> |
4*sizeof(float)*nr); |
267 |
|
if (n < 0) |
268 |
|
error(SYSTEM, "read failure in flush_queue"); |
269 |
|
bp = rtbuf; /* process packets */ |