X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Fust-ctl.c;h=fe65fafe2c6f3d00a930c5108595657d91522000;hp=b5f2ce411d811ad56975b39c95aa7f02dbe9d08b;hb=e88129fcabf35d124a7d97f6600350745dcbbb81;hpb=f3ed775ef4842019b396f06095b053c3a70bc3c8 diff --git a/ltt-sessiond/ust-ctl.c b/ltt-sessiond/ust-ctl.c index b5f2ce411..fe65fafe2 100644 --- a/ltt-sessiond/ust-ctl.c +++ b/ltt-sessiond/ust-ctl.c @@ -3,8 +3,8 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * as published by the Free Software Foundation; only version 2 + * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,11 +23,11 @@ #include #include -#include "libustctl.h" -#include "liblttsessiondcomm.h" +#include #include "lttngerr.h" #include "ust-ctl.h" +#ifdef DISABLED /* * find_session_ust_trace_by_pid * @@ -57,7 +57,7 @@ static struct ltt_ust_trace *find_session_ust_trace_by_pid( */ int get_trace_count_per_session(struct ltt_session *session) { - return session->ust_trace_count + session->kern_session_count; + return session->ust_trace_count; } /* @@ -89,7 +89,8 @@ void get_traces_per_session(struct ltt_session *session, struct lttng_trace *tra if (session->kern_session_count > 0) { trace.type = KERNEL; - strncpy(trace.name, "kernel", 6); + strncpy(trace.name, "kernel", sizeof(trace.name)); + trace.name[sizeof(trace.name) - 1] = '\0'; memcpy(&traces[i], &trace, sizeof(trace)); } } @@ -206,4 +207,5 @@ int ust_stop_trace(struct command_ctx *cmd_ctx) error: return ret; } +#endif