diff options
author | Alexander Mohr <alexander.m.mohr@daimler.com> | 2021-07-29 12:55:23 +0200 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-08-06 14:08:23 +0900 |
commit | 5379928defc81fc3826d84a634893c27394da59f (patch) | |
tree | d060aeeab7dc6b1005fe339dc67e6836ac951ebd /include | |
parent | 655f8caa782742ec1565dd8683422dce8fa3f29a (diff) | |
download | DLT-daemon-5379928defc81fc3826d84a634893c27394da59f.tar.gz |
file-transfer: Abort file transfer if get serial number failed
If a file is deleted while a file transfer is ongoing,
the file transfer tries to seek through the whole file.
This is due to the fact the the file handle is held open.
getFileSerialNumber is already validating the file
by using stat.
If this call returns a negative value, we know
that a stat to the file is not possible anymore,
therefore further reading can be aborted.
Diffstat (limited to 'include')
-rw-r--r-- | include/dlt/dlt_filetransfer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/dlt/dlt_filetransfer.h b/include/dlt/dlt_filetransfer.h index 728dfbb..5404d1a 100644 --- a/include/dlt/dlt_filetransfer.h +++ b/include/dlt/dlt_filetransfer.h @@ -52,6 +52,8 @@ #define DLT_FILETRANSFER_ERROR_INFO_ABOUT -700 /* ! Error code for dlt_user_log_file_packagesCount */ #define DLT_FILETRANSFER_ERROR_PACKAGE_COUNT -800 +/* ! Error code for failed get serial number */ +#define DLT_FILETRANSFER_FILE_SERIAL_NUMBER -900 /* !Transfer the complete file as several dlt logs. */ |