summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index b48fc78..1372437 100644
--- a/src/main.c
+++ b/src/main.c
@@ -616,6 +616,12 @@ err:
gettimeofday(&tv_stop, NULL);
timersub(&tv_stop, &tv_start, &tv);
+ if (data_len != file_size) {
+ syslog(LOG_ERR, "Failure, file size is %lu bytes but received %lu bytes!\n",
+ file_size, data_len);
+ return EXIT_FAILURE;
+ }
+
if (_cli.state == TIP_CLIENT_DONE) {
printf("OK.\n");
syslog(LOG_INFO, "Done in %lu.%06lu seconds (%lu Mbytes/second). "