From: Jérémie Galarneau Date: Thu, 6 Aug 2015 19:01:50 +0000 (-0400) Subject: Return "Unknown" error instead of "Fatal" on unhandled agent replies X-Git-Tag: v2.8.0-rc1~513 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3bd9aaeb12b1aa544a76d9709aefe033d0ee116c;p=lttng-tools.git Return "Unknown" error instead of "Fatal" on unhandled agent replies Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index ab6905190..d1e672333 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -303,9 +303,7 @@ static ssize_t list_events(struct agent_app *app, struct lttng_event **events) data_size = be32toh(reply_hdr.data_size) + sizeof(*reply); break; default: - ERR("Agent returned an unknown code: %" PRIu32, - be32toh(reply_hdr.ret_code)); - ret = LTTNG_ERR_FATAL; + ret = LTTNG_ERR_UNK; goto error; } @@ -402,9 +400,7 @@ static int enable_event(struct agent_app *app, struct agent_event *event) ret = LTTNG_ERR_UST_EVENT_NOT_FOUND; goto error; default: - ERR("Agent returned an unknown code: %" PRIu32, - be32toh(reply.ret_code)); - ret = LTTNG_ERR_FATAL; + ret = LTTNG_ERR_UNK; goto error; } @@ -465,9 +461,7 @@ static int disable_event(struct agent_app *app, struct agent_event *event) ret = LTTNG_ERR_UST_EVENT_NOT_FOUND; goto error; default: - ERR("Agent returned an unknown code: %" PRIu32, - be32toh(reply.ret_code)); - ret = LTTNG_ERR_FATAL; + ret = LTTNG_ERR_UNK; goto error; }