From ef2e05cad3790dab8c5940d24d17b24949ea21af Mon Sep 17 00:00:00 2001 From: Sven Hassler Date: Thu, 11 Feb 2016 09:09:16 +0100 Subject: dlt-system filetransfer waits for a client For each file that is supposed to be sent, dlt-system will check if a client is connected to the daemon. If not, it waits and keeps checking once per second, until a client is connected. Files will still be compressed and moved to the .tosend subdirectory, regardless of the client connection. Changed the default startup timeout in the configuration file to 0. Change-Id: I5850adb51c381bc6279ac59f5bd985491ba5caf3 Signed-off-by: Lutz Helwing --- src/system/dlt-system-filetransfer.c | 3 +++ src/system/dlt-system.conf | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/system/dlt-system-filetransfer.c b/src/system/dlt-system-filetransfer.c index 7cdcbac..6d519ac 100644 --- a/src/system/dlt-system-filetransfer.c +++ b/src/system/dlt-system-filetransfer.c @@ -139,6 +139,9 @@ char *unique_name(char *src) void send_dumped_file(FiletransferOptions const *opts,char *dst_tosend) { + // check if a client is connected to the deamon. If not, try again in a second + while(dlt_get_log_state() != 1) + sleep(1); char *fn = origin_name(dst_tosend); DLT_LOG(dltsystem, DLT_LOG_DEBUG, diff --git a/src/system/dlt-system.conf b/src/system/dlt-system.conf index 1097b2c..5537bc1 100644 --- a/src/system/dlt-system.conf +++ b/src/system/dlt-system.conf @@ -79,8 +79,8 @@ FiletransferEnable = 0 # The Context Id of the filetransfer (Default: FILE) FiletransferContextId = FILE -# Time in seconds after startup of dlt-system when first file is transfered (Default: 30) -FiletransferTimeStartup = 30 +# Time in seconds after startup of dlt-system when first file is transfered (Default: 0) +FiletransferTimeStartup = 0 # Time to wait when transfered file is deleted and next file transfer starts (Default: 10) # Time in seconds -- cgit v1.2.1