X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fupload.c;h=2c429694748167852f0a0a42b56bbe3abc308a99;hp=f8d312ffb65a778f652aad50ec8acec95cac06b1;hb=f4d996fd26762053d68f46de5790aae893f03d38;hpb=33b638109ed66ea360b53b80b1f407b3a5f5ec39 diff --git a/daemon/upload.c b/daemon/upload.c index f8d312f..2c42969 100644 --- a/daemon/upload.c +++ b/daemon/upload.c @@ -94,8 +94,11 @@ upload (const char *filename, int flags, int64_t offset) 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 (data.fd); - /* Do NOT send any error. */ return -1; }