X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fbase64.c;h=8aca5b714b27317530b2008be31023b8233fb730;hb=635af5be04265f845186b40e9a9fe7b102ad6909;hp=7e07a6ad93d5a4c491c3a91235cd1ecb10641726;hpb=9ff99418361cd1b56b00e4ffef52444021e60c72;p=libguestfs.git diff --git a/daemon/base64.c b/daemon/base64.c index 7e07a6a..8aca5b7 100644 --- a/daemon/base64.c +++ b/daemon/base64.c @@ -77,14 +77,15 @@ do_base64_in (const char *file) 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"); pclose (fp); - /* Do NOT send any error. */ return -1; } if (pclose (fp) != 0) { - if (r == -1) /* if r == 0, file transfer ended already */ - cancel_receive (); reply_with_error ("base64 subcommand failed on file: %s", file); return -1; }