guestfsd: don't ignore failed write-to-socket
authorJim Meyering <meyering@redhat.com>
Mon, 17 Aug 2009 08:25:42 +0000 (10:25 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 17 Aug 2009 09:40:24 +0000 (11:40 +0200)
* daemon/proto.c (reply): Fix typo that would cause us to ignore
failed write-to-socket.

daemon/proto.c

index 709f978..9b33902 100644 (file)
@@ -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);
   }