[linux-dvb] [PATCH] 1/3: BUG FIX in dvb_ringbuffer_flush

Andrea mariofutire at googlemail.com
Sat Mar 22 12:32:43 CET 2008

linux-dvb-request at linuxtv.org wrote:
> Date: Sat, 22 Mar 2008 04:56:43 +0100
> From: Oliver Endriss <o.endriss at gmx.de>
  > Nak. At the first glance one might think that this patch is correct.
  > Unfortunately, it introduces a subtle bug.

> So I suggest to leave dvb_ringbuffer_flush() as is and zero the read and
> write pointers only where it is really required...

Thanks for your feedback.
You are right and I have changed the code.

I've added a new function in the ringbuffer that resets the pointers to 0 and clears the error flag.
There might be some more factoring and one could move into that function 2 more lines

	buf->data = NULL;
	buf->size = size;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ring2.diff
Type: text/x-patch
Size: 1661 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080322/678a4bbc/attachment.bin 

More information about the linux-dvb mailing list