From b894343d659df2f6aa9ed50532fd4d8c0757e089 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 4 Sep 2015 17:34:44 -0400 Subject: [PATCH] Fix: Invalid parameter error reported when untracking PID MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The LTTng client reports an "Invalid parameter" error if a PID is untracked from the userspace domain before any PID is tracked in that domain. Fixes #931 Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/trace-ust.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index b70d63673..9ec6e43b0 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -788,7 +788,8 @@ int trace_ust_untrack_pid(struct ltt_ust_session *session, int pid) struct ust_app *app; if (!session->pid_tracker.ht) { - retval = LTTNG_ERR_INVALID; + /* No PID being tracked. */ + retval = LTTNG_ERR_PID_NOT_TRACKED; goto end; } /* Remove PID from tracker */ -- 2.34.1