git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.10.10.
[libguestfs.git]
/
daemon
/
debug.c
diff --git
a/daemon/debug.c
b/daemon/debug.c
index
091e741
..
0ade2a4
100644
(file)
--- a/
daemon/debug.c
+++ b/
daemon/debug.c
@@
-540,16
+540,15
@@
do_debug_upload (const char *filename, int mode)
return -1;
}
if (r == -2) { /* cancellation from library */
return -1;
}
if (r == -2) { /* cancellation from library */
+ /* This error is ignored by the library since it initiated the
+ * cancel. Nevertheless we must send an error reply here.
+ */
+ reply_with_error ("file upload cancelled");
close (fd);
close (fd);
- /* Do NOT send any error. */
return -1;
}
if (close (fd) == -1) {
return -1;
}
if (close (fd) == -1) {
- int err = errno;
- if (r == -1) /* if r == 0, file transfer ended already */
- cancel_receive ();
- errno = err;
reply_with_perror ("close: %s", filename);
return -1;
}
reply_with_perror ("close: %s", filename);
return -1;
}