From: Michael Jeanson Date: Wed, 14 Oct 2015 18:33:43 +0000 (-0400) Subject: Port: Use LTTNG_HOST_NAME_MAX instead of HOST_NAME_MAX X-Git-Tag: v2.8.0-rc1~286 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9cf3eb20220bf3ecfb0d9e4946105e7ea8cb3bf3;p=lttng-tools.git Port: Use LTTNG_HOST_NAME_MAX instead of HOST_NAME_MAX Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/constant.h b/include/lttng/constant.h index edf4c3a8d..d3bc8f4a5 100644 --- a/include/lttng/constant.h +++ b/include/lttng/constant.h @@ -56,4 +56,6 @@ #define LTTNG_NAME_MAX 255 +#define LTTNG_HOST_NAME_MAX 64 + #endif /* LTTNG_CONSTANT_H */ diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 28e52696e..53ffbddf0 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1069,12 +1069,12 @@ static int relay_create_session(struct lttcomm_relayd_hdr *recv_hdr, struct relay_session *session; struct lttcomm_relayd_status_session reply; char session_name[LTTNG_NAME_MAX]; - char hostname[HOST_NAME_MAX]; + char hostname[LTTNG_HOST_NAME_MAX]; uint32_t live_timer = 0; bool snapshot = false; memset(session_name, 0, LTTNG_NAME_MAX); - memset(hostname, 0, HOST_NAME_MAX); + memset(hostname, 0, LTTNG_HOST_NAME_MAX); memset(&reply, 0, sizeof(reply)); diff --git a/src/bin/lttng-relayd/session.h b/src/bin/lttng-relayd/session.h index de1e44f0d..3ee1c45c3 100644 --- a/src/bin/lttng-relayd/session.h +++ b/src/bin/lttng-relayd/session.h @@ -40,7 +40,7 @@ struct relay_session { */ uint64_t id; char session_name[LTTNG_NAME_MAX]; - char hostname[HOST_NAME_MAX]; + char hostname[LTTNG_HOST_NAME_MAX]; uint32_t live_timer; /* Session in snapshot mode. */ diff --git a/src/common/sessiond-comm/relayd.h b/src/common/sessiond-comm/relayd.h index 1152d28e9..fa45de16a 100644 --- a/src/common/sessiond-comm/relayd.h +++ b/src/common/sessiond-comm/relayd.h @@ -169,7 +169,7 @@ struct lttcomm_relayd_index { */ struct lttcomm_relayd_create_session_2_4 { char session_name[LTTNG_NAME_MAX]; - char hostname[HOST_NAME_MAX]; + char hostname[LTTNG_HOST_NAME_MAX]; uint32_t live_timer; uint32_t snapshot; } LTTNG_PACKED;