diff options
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/base64.c | 5 | ||||
-rw-r--r-- | daemon/debug.c | 5 | ||||
-rw-r--r-- | daemon/tar.c | 5 | ||||
-rw-r--r-- | daemon/upload.c | 5 |
4 files changed, 16 insertions, 4 deletions
diff --git a/daemon/base64.c b/daemon/base64.c index 7e07a6ad..f55e1f51 100644 --- a/daemon/base64.c +++ b/daemon/base64.c @@ -77,8 +77,11 @@ 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; } diff --git a/daemon/debug.c b/daemon/debug.c index 091e7410..cd3e8a5f 100644 --- a/daemon/debug.c +++ b/daemon/debug.c @@ -540,8 +540,11 @@ do_debug_upload (const char *filename, int mode) 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); - /* Do NOT send any error. */ return -1; } diff --git a/daemon/tar.c b/daemon/tar.c index 3c756afc..39fce8c9 100644 --- a/daemon/tar.c +++ b/daemon/tar.c @@ -118,8 +118,11 @@ do_tXz_in (const char *dir, const char *filter) 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; } diff --git a/daemon/upload.c b/daemon/upload.c index f8d312ff..2c429694 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; } |