Fix: Handle both agent config files pointing to same port
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Thu, 2 Jun 2016 07:05:31 +0000 (03:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2016 13:21:34 +0000 (15:21 +0200)
commitc6a5845760ee02e99e5d0609f47706036e257d7f
treed0483d5b21a8c51ba3f86273a1eedb639eb481a3
parentfb30ba0004613d08357def6cdc3122083dd0019e
Fix: Handle both agent config files pointing to same port

The expected locations for the user and root agent sessiond
configuration files are ~/.lttng/agent.port and
/var/run/lttng/agent.port, respectively. These files indicate
which port an agent should connect to to reach its respective
sessiond.

If by some bad luck both files indicate the same port, then
both Java TCP clients would end up connecting to the same
sessiond, resulting in weird results, like "lttng list" listing
all events twice.

Make sure the target ports are different, and avoid duplicate
connections in case there are not.

Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/LttngTcpSessiondClient.java
This page took 0.024605 seconds and 4 git commands to generate.