From: David Goulet Date: Wed, 19 Dec 2012 19:13:24 +0000 (-0500) Subject: Fix: wrong check on session started on stop command X-Git-Tag: v2.1.0~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f9dfc3d95caf3a7d927d58f252006390e168a1c2;p=lttng-tools.git Fix: wrong check on session started on stop command This is problematic for application that lives longer than the tracing session so the make check unfortunately did not catch this problem since we either kill the applications before the stop or wait for them to die. I will quote a colleague of mine on IRC after discovering this: 14:14 < cbab> moar tests! :) Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index dd8d103fd..0b32f3518 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -2402,7 +2402,7 @@ int ust_app_stop_trace(struct ltt_ust_session *usess, struct ust_app *app) * from either the application manager thread or the command thread. Simply * indicate that this is a stop error. */ - if (ua_sess->started == 1) { + if (!ua_sess->started) { goto error_rcu_unlock; }