summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/dlt-daemon.c4
-rw-r--r--src/daemon/dlt_daemon_client.c2
-rw-r--r--src/daemon/dlt_daemon_offline_logstorage.c9
3 files changed, 11 insertions, 4 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 2c9ff6a..c8a8506 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -1009,7 +1009,7 @@ int main(int argc, char *argv[])
dlt_log(LOG_ERR, "Could not load runtime config\n");
return -1;
}
-
+
/*
* Load dlt-runtime.cfg if available.
* This must be loaded before offline setup
@@ -2157,6 +2157,8 @@ int dlt_daemon_process_client_connect(DltDaemon *daemon,
if (dlt_daemon_send_ringbuffer_to_client(daemon, daemon_local, verbose) == -1) {
dlt_log(LOG_WARNING, "Can't send contents of ringbuffer to clients\n");
+ close(in_sock);
+ in_sock = -1;
return -1;
}
diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c
index 82e2965..9ebbd23 100644
--- a/src/daemon/dlt_daemon_client.c
+++ b/src/daemon/dlt_daemon_client.c
@@ -1085,7 +1085,7 @@ void dlt_daemon_control_get_log_info(int sock,
daemon->ecuid,
verbose);
- if (application) {
+ if ((user_list->applications) && (application)) {
/* Calculate start offset within contexts[] */
offset_base = 0;
diff --git a/src/daemon/dlt_daemon_offline_logstorage.c b/src/daemon/dlt_daemon_offline_logstorage.c
index 5d21a76..c796d06 100644
--- a/src/daemon/dlt_daemon_offline_logstorage.c
+++ b/src/daemon/dlt_daemon_offline_logstorage.c
@@ -233,9 +233,14 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_multi(char *key,
else {
strncpy(ecuid, tok, DLT_ID_SIZE);
tok = strtok(NULL, ":");
- strncpy(apid, tok, DLT_ID_SIZE);
+
+ if (tok != NULL)
+ strncpy(apid, tok, DLT_ID_SIZE);
+
tok = strtok(NULL, ":");
- strncpy(ctid, tok, DLT_ID_SIZE);
+
+ if (tok != NULL)
+ strncpy(ctid, tok, DLT_ID_SIZE);
}
return DLT_RETURN_OK;