[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] Bug in rt_com-0.5.3.



> From: Denis RICHARD <dri@sxb.bsf.alcatel.fr>
>
> Hi all,
>
> I found a bug in rt_com-0.5.3.
>
> To verify free space remaining in a buffer (input or output), the
> indexes head and tail are compared. But when the buffer is full
> (head == tail), it is considered as empty. It cannot do the difference
> between a full and an empty buffer.
>
> To solve that, I added a counter (used) in the rt_buf_struct structure,
> which count the numbers of characters in the buffer.
>
> Attach the diff file.
>
> Denis

I ran into the same problem. However, I fixed it by modifying 
rt_com_buff_free() to return a value 1 less than previously. I also 
made what I thought were a couple of other improvements. These 
changes have been posted on sourceforge.net as release "0.5.5 pre1".

-- James


----------------------------------------
James H. Puttick

Kerr Vayne Systems Ltd.
1 Valleywood Drive, Unit 5A
Markham, Ontario L3R 5L9
Canada

+1 905 475 6161  office
+1 905 479 9833  fax

mailto:james.puttick@kvs.com
----------------------------------------