ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rholo2l.c
(Generate patch)

Comparing ray/src/hd/rholo2l.c (file contents):
Revision 3.1 by gregl, Fri Oct 31 10:23:29 1997 UTC vs.
Revision 3.2 by gregl, Fri Oct 31 11:44:09 1997 UTC

# Line 207 | Line 207 | int    poll;
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];
# Line 252 | Line 252 | flush_queue()                  /* empty all rtrace queues */
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 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines