Re: [libvirt] [PATCH] stream: Check for stream EOF

2012-01-11 Thread Daniel P. Berrange
On Tue, Jan 10, 2012 at 05:28:50PM +0100, Michal Privoznik wrote: If client stream does not have any data to sink and neither received EOF, a dummy packet is sent to the daemon signalising client is ready to sink some data. However, after we added event loop to client a race may occur:

[libvirt] [PATCH] stream: Check for stream EOF

2012-01-10 Thread Michal Privoznik
If client stream does not have any data to sink and neither received EOF, a dummy packet is sent to the daemon signalising client is ready to sink some data. However, after we added event loop to client a race may occur: Thread 1 calls virNetClientStreamRecvPacket and since no data are cached nor