summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
diff options
context:
space:
mode:
authorsebastienr <sebastien.raillet@gmail.com>2020-11-25 01:11:43 +0100
committerGitHub <noreply@github.com>2020-11-25 09:11:43 +0900
commitf093d547c2e4c68d0b7060f9accfc67784b7c06a (patch)
tree073535ce523b8bcfb66f0bff5e2056068d20b9ef /src/daemon/dlt-daemon.c
parent723344e43485c105fe79d21e2ba4c0dcd3dd0ca7 (diff)
downloadDLT-daemon-f093d547c2e4c68d0b7060f9accfc67784b7c06a.tar.gz
dlt-daemon: Adds an option to disable injection mode (#266)
A new option named "InjectionMode" allows to select if we want to enable / disable the feature Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r--src/daemon/dlt-daemon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index a14de88..cd6e5d9 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -322,6 +322,7 @@ int option_file_parser(DltDaemonLocal *daemon_local)
daemon_local->UDPMulticastIPPort = MULTICASTIPPORT;
#endif
daemon_local->flags.ipNodes = NULL;
+ daemon_local->flags.injectionMode = 1;
/* open configuration file */
if (daemon_local->flags.cvalue[0])
@@ -705,6 +706,9 @@ int option_file_parser(DltDaemonLocal *daemon_local)
dlt_vlog(LOG_WARNING, "BindAddress option is empty\n");
}
}
+ else if (strcmp(token, "InjectionMode") == 0) {
+ daemon_local->flags.injectionMode = atoi(value);
+ }
else {
fprintf(stderr, "Unknown option: %s=%s\n", token, value);
}