projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for auto session creation
[lttng-tools.git]
/
liblttngctl
/
liblttngctl.c
diff --git
a/liblttngctl/liblttngctl.c
b/liblttngctl/liblttngctl.c
index 76bdf5ffde2ff29b43940f3226f51fc8d5a10329..1793bc53ad44a23195157427b30950f85bb8e9d6 100644
(file)
--- a/
liblttngctl/liblttngctl.c
+++ b/
liblttngctl/liblttngctl.c
@@
-111,6
+111,11
@@
static int ask_sessiond(enum lttcomm_command_type lct, void **buf)
size_t size;
void *data = NULL;
size_t size;
void *data = NULL;
+ ret = lttng_connect_sessiond();
+ if (ret < 0) {
+ goto end;
+ }
+
lsm.cmd_type = lct;
/* Send command to session daemon */
lsm.cmd_type = lct;
/* Send command to session daemon */
@@
-148,7
+153,7
@@
static int ask_sessiond(enum lttcomm_command_type lct, void **buf)
ret = size;
end:
ret = size;
end:
- /* Reset lsm data struct */
+ lttng_disconnect_sessiond();
memset(&lsm, 0, sizeof(lsm));
return ret;
}
memset(&lsm, 0, sizeof(lsm));
return ret;
}
@@
-370,9
+375,9
@@
int lttng_disconnect_sessiond(void)
*
* Set the session uuid for current lsm.
*/
*
* Set the session uuid for current lsm.
*/
-void lttng_set_current_session_uuid(
char
*uuid)
+void lttng_set_current_session_uuid(
uuid_t
*uuid)
{
{
- uuid_
parse(uuid, lsm.session_
id);
+ uuid_
copy(lsm.session_id, *uu
id);
}
/*
}
/*
This page took
0.026308 seconds
and
4
git commands to generate.