[libvirt] [PATCH 3/3] Remove wrong check for uml monitor response size
Eric Blake
eblake at redhat.com
Sat Aug 14 17:11:40 UTC 2010
On 08/12/2010 03:00 AM, Soren Hansen wrote:
> The current check for the size of the response from the uml monitor is
> problematic for a couple of reasons:
>
> First of all, for me, the call to recvfrom returns 0, even though the
> buffer actually is populated with the response from the monitor.
I'm not sure about this one. The recvfrom is called in a loop, and
POSIX says that recvfrom shall return the size if a message was read, or
0 if no messages were available but the other end of the connection did
an orderly shutdown. I think we need a bit more understanding of why
you are getting a 0 return, and whether it only happens after a
successful iteration of the loop (in which case the contents of res are
leftover from the prior iteration).
>
> At any rate, the only way I can get anything useful to happen here is to
> completely remove the check, so this patch does just that.
In other words, maybe the better thing to do is add an earlier check:
if (nbytes == 0) break;
but I'm not sure of that idea, either, without more understanding of the
root cause.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100814/ee5add41/attachment-0001.sig>
More information about the libvir-list
mailing list