X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fbase64.c;h=8aca5b714b27317530b2008be31023b8233fb730;hb=ceb3a57f67f33b33c1f6cafdd0ef81808273f0c0;hp=1d2d1d0f23f2632208febe28c475ed8f3540c45a;hpb=50eed6d20de9b6d16975c3c0bbf6e545f8fba1fe;p=libguestfs.git diff --git a/daemon/base64.c b/daemon/base64.c index 1d2d1d0..8aca5b7 100644 --- a/daemon/base64.c +++ b/daemon/base64.c @@ -23,7 +23,7 @@ #include #include -#include "../src/guestfs_protocol.h" +#include "guestfs_protocol.h" #include "daemon.h" #include "actions.h" @@ -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; }