int sock, struct pollfd *consumer_sockpoll)
{
ssize_t ret;
- enum lttng_error_code ret_code = LTTNG_OK;
+ enum lttcomm_return_code ret_code = LTTCOMM_CONSUMERD_SUCCESS;
struct lttcomm_consumer_msg msg;
ret = lttcomm_recv_unix_sock(sock, &msg, sizeof(msg));
/* Somehow, the session daemon is not responding anymore. */
goto error_fatal;
}
- if (ret_code != LTTNG_OK) {
+
+ if (ret_code != LTTCOMM_CONSUMERD_SUCCESS) {
/* Channel was not found. */
goto end_nosignal;
}
goto end_nosignal;
}
+ /* Stop right now if no channel was found. */
+ if (!channel) {
+ goto end_nosignal;
+ }
+
/*
* This command should ONLY be issued for channel with streams set in
* no monitor mode.