summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hassler <sven_hassler@mentor.com>2015-09-23 16:48:55 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-10-07 10:40:16 +0200
commit033a69218af3490f6be409f66f350c1568655f61 (patch)
tree45f7da60388e8177c058bfe98b3f50e4fbc13390
parent4b9af8e3a1686dd34c2ad72662c61c66044c056e (diff)
downloadDLT-daemon-033a69218af3490f6be409f66f350c1568655f61.tar.gz
Fixed INTERNAL-mode connection bug in dlt-daemon
When logging-mode of the DLT-daemon was set to DLT_USER_MODE_INTERNAL or DLT_USER_MODE_OFF and a client tried to connect to the daemon, the socket for accepting new connections would be closed. This would make connecting to the daemon impossible, even if the logging mode was reset to DLT_USER_MODE_EXTERNAL or DLT_USER_MODE_BOTH. Fixed this by removing conditional check on the logging mode - clients connections are always accepted now. If the logging-mode is being switched from INTERNAL to EXTERNAL or BOTH while a client is connected, the client will then start to receive messages normally. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
-rw-r--r--src/daemon/dlt-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 5022da4..02e3f05 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -563,7 +563,7 @@ int main(int argc, char* argv[])
{
if (FD_ISSET(i, &(daemon_local.read_fds)))
{
- if (i == daemon_local.sock && ((daemon.mode == DLT_USER_MODE_EXTERNAL) || (daemon.mode == DLT_USER_MODE_BOTH)))
+ if (i == daemon_local.sock)
{
/* event from TCP server socket, new connection */
if (dlt_daemon_process_client_connect(&daemon, &daemon_local, daemon_local.flags.vflag)==-1)