From: David Goulet Date: Tue, 18 Dec 2012 17:09:09 +0000 (-0500) Subject: Fix: add missing goto pending if data is inflight X-Git-Tag: v2.1.0~34 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=bdd88757eedddd53dea46645574f218094573c74;hp=c45536e170aa9ba8aeb9ba21da25b7cec73392f6 Fix: add missing goto pending if data is inflight There was only a detection for data NOT inflight and for data inflight, if a relayd was found, was simply exiting the loop and return no data pending. Signed-off-by: David Goulet --- diff --git a/src/common/consumer.c b/src/common/consumer.c index 0df073523..1de9cbadb 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -3028,10 +3028,12 @@ int consumer_data_pending(uint64_t id) ret = relayd_end_data_pending(&relayd->control_sock, relayd->relayd_session_id, &is_data_inflight); pthread_mutex_unlock(&relayd->ctrl_sock_mutex); - if (ret < 0 || !is_data_inflight) { - /* On error or if NO data inflight, no data is pending. */ + if (ret < 0) { goto data_not_pending; } + if (is_data_inflight) { + goto data_pending; + } } /*