Return "Unknown" error instead of "Fatal" on unhandled agent replies
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Aug 2015 19:01:50 +0000 (15:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Aug 2015 19:05:29 +0000 (15:05 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent.c

index ab6905190e0eb7082923832398fdababae09efbc..d1e6723337c2a809100124e6762a730816218974 100644 (file)
@@ -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;
        }
 
This page took 0.026302 seconds and 4 git commands to generate.