summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorSven Hassler <sven_hassler@mentor.com>2016-02-11 09:09:16 +0100
committerLutz Helwing <lutz_helwing@mentor.com>2016-02-17 14:38:28 +0100
commitef2e05cad3790dab8c5940d24d17b24949ea21af (patch)
treed474b299351cdbb42ef4dadcd6e51bf660a88370 /src/system
parent5cfea0a62842ab80c391c75678f71ebf32b46344 (diff)
downloadDLT-daemon-ef2e05cad3790dab8c5940d24d17b24949ea21af.tar.gz
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 <lutz_helwing@mentor.com>
Diffstat (limited to 'src/system')
-rw-r--r--src/system/dlt-system-filetransfer.c3
-rw-r--r--src/system/dlt-system.conf4
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