Daniel P. Berrange wrote:
On Wed, Apr 11, 2007 at 01:01:30PM +0100, Richard W.M. Jones wrote:I don't think those patches got memory allocation / deallocation of XDR structures right. Not surprising really since it's totally undocumented! In a bid to rectify this, I have documented how to do it here:http://et.redhat.com/~rjones/xdr_tests/Nice. BTW on the subject of record streams - xdrrec_create - while very nice looking on the surface, it is utterly useless because the impl relies on the underlying FD / socket being in blocking mode. If you use non-blocking sockets marshalling/de-marshalling will fail on the first-EAGAIN the routines see, and they have no way to restart where they left off. This is why I serialized to/from a xdrmem buffer, and then usedmy own read/write code to send to the socket where I could correctly deal with non-blocking mode.
Oh right - that totally passed me by. When are you using non-blocking sockets? I was under the impression they were all blocking in qemu_internal / libvirt_qemud.
Rich. -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland)
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature