projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
API change for lttng_start/stop_tracing prototype
[lttng-tools.git]
/
liblttngctl
/
lttngctl.c
diff --git
a/liblttngctl/lttngctl.c
b/liblttngctl/lttngctl.c
index 48e82def7570ef225c6b83de8f3962fe858c6c7f..ed685966ee43c606e11d60669a4e8f20ccfba9a7 100644
(file)
--- a/
liblttngctl/lttngctl.c
+++ b/
liblttngctl/lttngctl.c
@@
-425,17
+425,17
@@
int lttng_register_consumer(struct lttng_handle *handle,
/*
* Start tracing for all trace of the session.
*/
/*
* Start tracing for all trace of the session.
*/
-int lttng_start_tracing(
struct lttng_handle *handl
e)
+int lttng_start_tracing(
const char *session_nam
e)
{
struct lttcomm_session_msg lsm;
{
struct lttcomm_session_msg lsm;
- if (
handl
e == NULL) {
+ if (
session_nam
e == NULL) {
return -1;
}
lsm.cmd_type = LTTNG_START_TRACE;
return -1;
}
lsm.cmd_type = LTTNG_START_TRACE;
- copy_string(lsm.session.name, handle->session_name,
-
sizeof(lsm.session.name));
+
+
copy_string(lsm.session.name, session_name,
sizeof(lsm.session.name));
return ask_sessiond(&lsm, NULL);
}
return ask_sessiond(&lsm, NULL);
}
@@
-443,13
+443,17
@@
int lttng_start_tracing(struct lttng_handle *handle)
/*
* Stop tracing for all trace of the session.
*/
/*
* Stop tracing for all trace of the session.
*/
-int lttng_stop_tracing(
struct lttng_handle *handl
e)
+int lttng_stop_tracing(
const char *session_nam
e)
{
struct lttcomm_session_msg lsm;
{
struct lttcomm_session_msg lsm;
+ if (session_name == NULL) {
+ return -1;
+ }
+
lsm.cmd_type = LTTNG_STOP_TRACE;
lsm.cmd_type = LTTNG_STOP_TRACE;
- copy_string(lsm.session.name, handle->session_name,
-
sizeof(lsm.session.name));
+
+
copy_string(lsm.session.name, session_name,
sizeof(lsm.session.name));
return ask_sessiond(&lsm, NULL);
}
return ask_sessiond(&lsm, NULL);
}
This page took
0.02355 seconds
and
4
git commands to generate.