X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Frelayd%2Frelayd.c;h=c883ea5d7f44432ead4ecbc614f8a8abc52686b1;hp=45cb097f616c1bf65b31d5d66ba45966e0877d8b;hb=bb63afd9d236f8aa96935ce21f415d76452187e2;hpb=1c946780b7b29d73eb62ce0bcb6a26e134bd2777 diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index 45cb097f6..c883ea5d7 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -133,8 +133,8 @@ int relayd_create_session(struct lttcomm_sock *sock, uint64_t *session_id) /* Return session id or negative ret code. */ if (reply.ret_code != LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd create session replied error %d", ret); + ret = -1; + ERR("Relayd create session replied error %d", reply.ret_code); goto error; } else { ret = 0; @@ -187,8 +187,8 @@ int relayd_add_stream(struct lttcomm_sock *sock, const char *channel_name, /* Return session id or negative ret code. */ if (reply.ret_code != LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd add stream replied error %d", ret); + ret = -1; + ERR("Relayd add stream replied error %d", reply.ret_code); } else { /* Success */ ret = 0; @@ -399,8 +399,8 @@ int relayd_send_close_stream(struct lttcomm_sock *sock, uint64_t stream_id, /* Return session id or negative ret code. */ if (reply.ret_code != LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd close stream replied error %d", ret); + ret = -1; + ERR("Relayd close stream replied error %d", reply.ret_code); } else { /* Success */ ret = 0; @@ -449,8 +449,7 @@ int relayd_data_pending(struct lttcomm_sock *sock, uint64_t stream_id, /* Return session id or negative ret code. */ if (reply.ret_code >= LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd data pending replied error %d", ret); + ERR("Relayd data pending replied error %d", reply.ret_code); } /* At this point, the ret code is either 1 or 0 */ @@ -496,8 +495,8 @@ int relayd_quiescent_control(struct lttcomm_sock *sock, /* Return session id or negative ret code. */ if (reply.ret_code != LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd quiescent control replied error %d", ret); + ret = -1; + ERR("Relayd quiescent control replied error %d", reply.ret_code); goto error; } @@ -540,8 +539,8 @@ int relayd_begin_data_pending(struct lttcomm_sock *sock, uint64_t id) /* Return session id or negative ret code. */ if (reply.ret_code != LTTNG_OK) { - ret = -reply.ret_code; - ERR("Relayd begin data pending replied error %d", ret); + ret = -1; + ERR("Relayd begin data pending replied error %d", reply.ret_code); goto error; }