*
* 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
#include <string.h>
#include <unistd.h>
-#include "libustctl.h"
-#include "liblttsessiondcomm.h"
+#include <lttng/lttng-sessiond-comm.h>
#include "lttngerr.h"
#include "ust-ctl.h"
*/
int get_trace_count_per_session(struct ltt_session *session)
{
- return session->ust_trace_count + session->kern_session_count;
+ return session->ust_trace_count;
}
/*
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));
}
}