X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Frelayd%2Frelayd.c;h=12f70f7e0bf8ad39dbcb5489b84fa953e3626bda;hp=49997015e3f9cb73f7fa63fa99c703dbb67a095b;hb=36f9f13bca63cdc94fcc12f03d9c3e181afc81a5;hpb=ecd1a12fac39784bded85c0f06e47ace2dc98cde diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index 49997015e..12f70f7e0 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -161,7 +161,7 @@ static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock, /* The three names are sent with a '\0' delimiter between them. */ session_name_len = strlen(session_name) + 1; hostname_len = strlen(hostname) + 1; - base_path_len = base_path ? strlen(base_path) + 1 : 0; + base_path_len = strlen(base_path) + 1; msg_length = sizeof(*msg) + session_name_len + hostname_len + base_path_len; msg = zmalloc(msg_length); @@ -191,7 +191,7 @@ static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock, goto error; } dst += hostname_len; - if (base_path && lttng_strncpy(dst, base_path, base_path_len)) { + if (lttng_strncpy(dst, base_path, base_path_len)) { ret = -1; goto error; } @@ -1480,6 +1480,8 @@ int relayd_trace_chunk_exists(struct lttcomm_relayd_sock *sock, if (!relayd_supports_chunks(sock)) { DBG("Refusing to check for trace chunk existence: relayd does not support chunks"); + /* The chunk will never exist */ + *chunk_exists = false; goto end; }