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;
}
{
int ret;
uint64_t data_size;
+ uint32_t reply_ret_code;
struct lttcomm_agent_enable msg;
struct lttcomm_agent_generic_reply reply;
goto error_io;
}
- switch (be32toh(reply.ret_code)) {
+ reply_ret_code = be32toh(reply.ret_code);
+ log_reply_code(reply_ret_code);
+ switch (reply_ret_code) {
case AGENT_RET_CODE_SUCCESS:
break;
case AGENT_RET_CODE_UNKNOWN_NAME:
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;
}
{
int ret;
uint64_t data_size;
+ uint32_t reply_ret_code;
struct lttcomm_agent_disable msg;
struct lttcomm_agent_generic_reply reply;
goto error_io;
}
- switch (be32toh(reply.ret_code)) {
+ reply_ret_code = be32toh(reply.ret_code);
+ log_reply_code(reply_ret_code);
+ switch (reply_ret_code) {
case AGENT_RET_CODE_SUCCESS:
break;
case AGENT_RET_CODE_UNKNOWN_NAME:
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;
}