From f9dfc3d95caf3a7d927d58f252006390e168a1c2 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 19 Dec 2012 14:13:24 -0500 Subject: [PATCH] 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 --- src/bin/lttng-sessiond/ust-app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1