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/upload.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/upload.c')
-rw-r--r-- | daemon/upload.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/upload.c b/daemon/upload.c index 143fa823..da86bd65 100644 --- a/daemon/upload.c +++ b/daemon/upload.c @@ -129,6 +129,8 @@ do_download (const char *filename) return -1; } - send_file_end (0); /* Normal end of file. */ + if (send_file_end (0)) /* Normal end of file. */ + return -1; + return 0; } |