X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.c;h=daf14b3396f8e8792b50c52028310aff0cf164d4;hb=210085740540bac3c106d45af3e8caa6d52873f6;hp=b79503b7d0185fd90b076c705f54ae6b90b8b3c2;hpb=6e78b10e47913603de67e026a90aa592136392ef;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index b79503b7d..daf14b339 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -134,6 +134,20 @@ int kernel_create_session(struct ltt_session *session) DBG("Kernel session created (fd: %d)", lks->fd); + /* + * This is necessary since the creation time is present in the session + * name when it is generated. + */ + if (session->has_auto_generated_name) { + ret = kernctl_session_set_name(lks->fd, DEFAULT_SESSION_NAME); + } else { + ret = kernctl_session_set_name(lks->fd, session->name); + } + if (ret) { + WARN("Could not set kernel session name for session %" PRIu64 " name: %s", + session->id, session->name); + } + return 0; error: