/* 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;
/* 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;
/* 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;
/* 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 */
/* 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;
}
/* 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;
}