On Sat, May 05, 2007 at 12:45:33PM +0100, Richard W.M. Jones wrote: > >6 Server-side QEMUD modifications > >--------------------------------- > > > >A qemud/protocol.x > >A qemud/protocol.c > >M qemud/protocol.h > >M qemud/Makefile.am > >M qemud/conf.c > >M qemud/dispatch.c > >M qemud/dispatch.h > >M qemud/internal.h > >M qemud/qemud.c > >M qemud/uuid.c > > Again, this is Dan's patch to make QEMUD use the XDR protocol: > > http://www.redhat.com/archives/libvir-list/2007-March/msg00333.html > Minor typo in qemudClientRead of qemud/qemud.c + if (!client->tls) { + if ((ret = read (client->fd, data, len)) == -1) { + if (ret == 0 || errno != EAGAIN) { + if (ret != 0) + qemudLog (QEMUD_ERR, "read: %s", strerror (errno)); + qemudDispatchClientFailure(server, client); + } + return -1; + } The test against the return value of read needs to be <= 0 instead of == -1, otherwise we spin on EOF. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|