Implement the relayd live features
[lttng-tools.git] / src / bin / lttng-sessiond / session.c
index a777b041428443fe856b4e7613920a377e7b494f..e4c747f7fd8e54583815ccb199e926aae226c611 100644 (file)
@@ -194,6 +194,11 @@ int session_create(char *name, uid_t uid, gid_t gid)
                goto error;
        }
 
+       ret = gethostname(new_session->hostname, sizeof(new_session->hostname));
+       if (ret && errno == ENAMETOOLONG) {
+               new_session->hostname[HOST_NAME_MAX - 1] = '\0';
+       }
+
        /* Init kernel session */
        new_session->kernel_session = NULL;
        new_session->ust_session = NULL;
This page took 0.023782 seconds and 5 git commands to generate.