diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-20 12:29:46 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-20 15:59:53 +0200 |
commit | d1c35f871022e40f9abd93048c1115c6565f94cb (patch) | |
tree | fc408da49d2690ede7c15bd6b9db0f67f56e4db4 /daemon/tar.c | |
parent | 0c92c583d5291e1a3a966b36f107bf48e4bfad93 (diff) | |
download | libguestfs-d1c35f871022e40f9abd93048c1115c6565f94cb.tar.gz libguestfs-d1c35f871022e40f9abd93048c1115c6565f94cb.tar.xz libguestfs-d1c35f871022e40f9abd93048c1115c6565f94cb.zip |
daemon: diagnose socket write failure
* daemon/proto.c (send_chunk): Don't ignore socket-write error.
* daemon/proto.c (send_file_end): Return "int", not void,
so we can propagate send_chunk failure to caller.
* daemon/daemon.h (send_file_end): Update prototype.
* daemon/tar.c (do_tar_out, do_tgz_out): Update uses of send_file_end.
* daemon/upload.c (do_download): Likewise.
Diffstat (limited to 'daemon/tar.c')
-rw-r--r-- | daemon/tar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/daemon/tar.c b/daemon/tar.c index 03dc5121..c3bdcf7e 100644 --- a/daemon/tar.c +++ b/daemon/tar.c @@ -149,7 +149,9 @@ do_tar_out (const char *dir) return -1; } - send_file_end (0); /* Normal end of file. */ + if (send_file_end (0)) /* Normal end of file. */ + return -1; + return 0; } @@ -268,6 +270,8 @@ do_tgz_out (const char *dir) return -1; } - send_file_end (0); /* Normal end of file. */ + if (send_file_end (0)) /* Normal end of file. */ + return -1; + return 0; } |