DBG("Kernel session created (fd: %d)", lks->fd);
- ret = kernctl_session_set_name(lks->fd, session->name);
+ /*
+ * 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");
+ WARN("Could not set kernel session name for session %" PRIu64 " name: %s",
+ session->id, session->name);
}
ret = kernctl_session_set_creation_time(lks->fd, session->creation_time);
if (ret) {
- WARN("Could not set kernel session creation time");
+ WARN("Could not set kernel session creation time for session %" PRIu64 " name: %s",
+ session->id, session->name);
}
return 0;