diff options
-rw-r--r-- | src/system/dlt-system-filetransfer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/system/dlt-system-filetransfer.c b/src/system/dlt-system-filetransfer.c index 7eb6e92..93a8cf3 100644 --- a/src/system/dlt-system-filetransfer.c +++ b/src/system/dlt-system-filetransfer.c @@ -185,11 +185,12 @@ int send_one(char *src, FiletransferOptions opts, int which) { int total = 2; int used = 2; - while(total-used < total/2) + dlt_user_check_buffer(&total, &used); + while((total-used) < (total/2)) { struct timespec t; t.tv_sec = 0; - t.tv_nsec = 1000*opts.TimeoutBetweenLogs; + t.tv_nsec = 1000000ul*opts.TimeoutBetweenLogs; nanosleep(&t, NULL); dlt_user_check_buffer(&total, &used); } |