Fix: Java agent: update ref count in enabledLoggers
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 7 Apr 2015 18:26:35 +0000 (14:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Aug 2015 19:02:15 +0000 (15:02 -0400)
commitd09aa6cd1efdb8733343781be86b11d73e5bc1ae
treea735f25d37e57e14245a09026bcdae24196c1b5b
parentdc1d9562be4fdee6ae3f74c58e2d0543a4fd4530
Fix: Java agent: update ref count in enabledLoggers

Integer objects are immutable in Java, so

    Integer refcount = enabledLoggers.get(name);
    refcount--;

does not update the value in enabledLoggers.

However, this bug "fixes" a bug in the session daemon
(LTTng-tools) which sends multiple _disable event_
commands for the same event name (one when the event is
disabled manually, and another one when the session is
destroyed). Therefore we use the registration done
command's version to know if the Java agent is connected to
a fixed or non-fixed session daemon, using the old
behaviour if connected to a non-fixed one.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java-agent/java/org/lttng/ust/agent/LTTngTCPSessiondClient.java
liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFramework.java
liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java
This page took 0.024465 seconds and 4 git commands to generate.