[Libguestfs] [PATCH libguestfs 11/13] guestfsd: don't ignore failed write-to-socket

Jim Meyering jim at meyering.net
Mon Aug 17 09:11:02 UTC 2009


From: Jim Meyering <meyering at redhat.com>

* daemon/proto.c (reply): Fix typo that would cause us to ignore
failed write-to-socket.
---
 daemon/proto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemon/proto.c b/daemon/proto.c
index 709f978..9b33902 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -288,7 +288,7 @@ reply (xdrproc_t xdrp, char *ret)
     fprintf (stderr, "xwrite failed\n");
     exit (1);
   }
-  if (xwrite (sock, buf, len) == len) {
+  if (xwrite (sock, buf, len) == -1) {
     fprintf (stderr, "xwrite failed\n");
     exit (1);
   }
-- 
1.6.4.378.g88f2f




More information about the Libguestfs mailing list