summaryrefslogtreecommitdiff
path: root/src/system/dlt-system-filetransfer.c
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/dlt-system-filetransfer.c
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/dlt-system-filetransfer.c')
-rw-r--r--src/system/dlt-system-filetransfer.c3
1 files changed, 3 insertions, 0 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,