summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-12-09 15:58:21 +0900
committerGitHub <noreply@github.com>2021-12-09 15:58:21 +0900
commitebcc88ef6ce1042d6873476dd7f1bdb6596efc92 (patch)
tree790f4157429568c3a4925698553e00647ba4ea89 /src
parentaa1364fbdf8700a2c3d2176180f92fb9a4b44251 (diff)
downloadDLT-daemon-ebcc88ef6ce1042d6873476dd7f1bdb6596efc92.tar.gz
filetransfer: Return error if no free space (#354)
Closes #353 Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/dlt_filetransfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/dlt_filetransfer.c b/src/lib/dlt_filetransfer.c
index 78084f0..3a4efc9 100644
--- a/src/lib/dlt_filetransfer.c
+++ b/src/lib/dlt_filetransfer.c
@@ -676,8 +676,10 @@ int dlt_user_log_file_data(DltContext *fileContext,
DLT_RAW(buffer, readBytes),
DLT_STRING("FLDA")
);
+ } else {
+ fclose(file);
+ return DLT_FILETRANSFER_ERROR_FILE_DATA_USER_BUFFER_FAILED;
}
-
doTimeout(timeout);
}
}