On 07/08/2013 06:42 PM, Yonit Halperin wrote:
Hi,
On 07/08/2013 06:32 AM, Uri Lublin wrote:
RCC_FOREACH may be dangerous
The following patches replace FOREACH loops with a SAFE version.
Using unsafe loops may cause spice-server to abort (assert fails).
Specifically a read/write fail in those loops, may cause the client
to disconnect, removing the node currently iterated, which cause spice
to abort in ring_next():
-- assertion `pos->next != NULL && pos->prev != NULL' failed
Now that red_channel was fixed to use RING_FOREACH_SAFE where needed,
I think it would be nicer to reuse red_channel.c code, specifically,
red_channel_pipes_new_add.
Hi Yonit,
Thanks for the review.
It's possible to reuse red_channel.c code.
I'm not sure it would make the code more readable with the
callbacks, but possibly easier to debug.
Thanks,
Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel