From: David Goulet Date: Fri, 26 Oct 2012 15:18:12 +0000 (-0400) Subject: Fix: Remove useless consumer subdir string concatenation X-Git-Tag: v2.1.0-rc6~19 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9a572cf512695118b85db5d9ed1157b3a4aa5b7f;p=lttng-tools.git Fix: Remove useless consumer subdir string concatenation Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 260cff671..184dd494c 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2203,11 +2203,6 @@ int cmd_enable_consumer(int domain, struct ltt_session *session) break; } - /* Append default kernel trace dir to subdir */ - strncat(ksess->consumer->subdir, DEFAULT_KERNEL_TRACE_DIR, - sizeof(ksess->consumer->subdir) - - strlen(ksess->consumer->subdir) - 1); - /* * @session-lock * This is race free for now since the session lock is acquired before @@ -2216,6 +2211,7 @@ int cmd_enable_consumer(int domain, struct ltt_session *session) * is valid. */ rcu_read_lock(); + /* Destroy current consumer. We are about to replace it */ consumer_destroy_output(ksess->consumer); rcu_read_unlock(); ksess->consumer = consumer; @@ -2289,11 +2285,6 @@ int cmd_enable_consumer(int domain, struct ltt_session *session) break; } - /* Append default kernel trace dir to subdir */ - strncat(usess->consumer->subdir, DEFAULT_UST_TRACE_DIR, - sizeof(usess->consumer->subdir) - - strlen(usess->consumer->subdir) - 1); - /* * @session-lock * This is race free for now since the session lock is acquired before @@ -2302,6 +2293,7 @@ int cmd_enable_consumer(int domain, struct ltt_session *session) * is valid. */ rcu_read_lock(); + /* Destroy current consumer. We are about to replace it */ consumer_destroy_output(usess->consumer); rcu_read_unlock(); usess->consumer = consumer;