Fix: off-by-one in comm proto between lttng-ctl and sessiond
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Oct 2012 23:19:29 +0000 (19:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Oct 2012 23:19:29 +0000 (19:19 -0400)
Mostly affects setting a filter on an event with large event name.

This fix breaks the ABI between lttng-ctl and lttng-sessiond, both
should be updated together, and sessiond must be restarted.

Fixes #357

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/sessiond-comm/sessiond-comm.h

index 6d796efe42e650b20683c58e74be725db4716ba0..753e842340e5f4fd882ca99a5d3e4e1c151725a6 100644 (file)
@@ -167,12 +167,12 @@ struct lttcomm_session_msg {
        struct lttng_domain domain;
        union {
                struct {
-                       char channel_name[NAME_MAX];
+                       char channel_name[LTTNG_SYMBOL_NAME_LEN];
                        char name[NAME_MAX];
                } disable;
                /* Event data */
                struct {
-                       char channel_name[NAME_MAX];
+                       char channel_name[LTTNG_SYMBOL_NAME_LEN];
                        struct lttng_event event;
                } enable;
                /* Create channel */
@@ -181,8 +181,8 @@ struct lttcomm_session_msg {
                } channel;
                /* Context */
                struct {
-                       char channel_name[NAME_MAX];
-                       char event_name[NAME_MAX];
+                       char channel_name[LTTNG_SYMBOL_NAME_LEN];
+                       char event_name[LTTNG_SYMBOL_NAME_LEN];
                        struct lttng_event_context ctx;
                } context;
                /* Use by register_consumer */
@@ -191,7 +191,7 @@ struct lttcomm_session_msg {
                } reg;
                /* List */
                struct {
-                       char channel_name[NAME_MAX];
+                       char channel_name[LTTNG_SYMBOL_NAME_LEN];
                } list;
                struct lttng_calibrate calibrate;
                /* Used by the set_consumer_url and used by create_session also call */
@@ -200,8 +200,8 @@ struct lttcomm_session_msg {
                        uint32_t size;
                } uri;
                struct {
-                       char channel_name[NAME_MAX];
-                       char event_name[NAME_MAX];
+                       char channel_name[LTTNG_SYMBOL_NAME_LEN];
+                       char event_name[LTTNG_SYMBOL_NAME_LEN];
                        /* Length of following bytecode */
                        uint32_t bytecode_len;
                } filter;
This page took 0.035773 seconds and 4 git commands to generate.