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:20:49 +0000 (15:20 +0200)
commite0c010a92d16f71a26a1e076a07ca52d60d4e810
treedfbb983226cd995a52b309d84be1505546de7a3a
parent41f8fda3d593c00bc2a1f56294487054a5dd8ea0
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.025143 seconds and 5 git commands to generate.