projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Collate handling of LTTNG_ENABLE_EVENT_WITH_FILTER
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
session.c
diff --git
a/src/bin/lttng-sessiond/session.c
b/src/bin/lttng-sessiond/session.c
index e4c747f7fd8e54583815ccb199e926aae226c611..07031a30a5c5bc6cf603b84847aac2a866919ede 100644
(file)
--- a/
src/bin/lttng-sessiond/session.c
+++ b/
src/bin/lttng-sessiond/session.c
@@
-195,8
+195,13
@@
int session_create(char *name, uid_t uid, gid_t gid)
}
ret = gethostname(new_session->hostname, sizeof(new_session->hostname));
}
ret = gethostname(new_session->hostname, sizeof(new_session->hostname));
- if (ret && errno == ENAMETOOLONG) {
- new_session->hostname[HOST_NAME_MAX - 1] = '\0';
+ if (ret < 0) {
+ if (errno == ENAMETOOLONG) {
+ new_session->hostname[sizeof(new_session->hostname) - 1] = '\0';
+ } else {
+ ret = LTTNG_ERR_FATAL;
+ goto error;
+ }
}
/* Init kernel session */
}
/* Init kernel session */
This page took
0.024462 seconds
and
5
git commands to generate.