X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Flttngctl.c;h=48e82def7570ef225c6b83de8f3962fe858c6c7f;hp=9c3735f38f9a2896b2f4e0d611adef2a682e76ca;hb=843f5df95fcaa45f89b7df96a0050d44255d702d;hpb=90192ee7cea425e30bd065576612156dd6cf5608 diff --git a/liblttngctl/lttngctl.c b/liblttngctl/lttngctl.c index 9c3735f38..48e82def7 100644 --- a/liblttngctl/lttngctl.c +++ b/liblttngctl/lttngctl.c @@ -666,17 +666,17 @@ int lttng_create_session(const char *name, const char *path) /* * Destroy session using name. */ -int lttng_destroy_session(struct lttng_handle *handle) +int lttng_destroy_session(const char *session_name) { struct lttcomm_session_msg lsm; - if (handle == NULL) { + if (session_name == NULL) { return -1; } lsm.cmd_type = LTTNG_DESTROY_SESSION; - 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); }