From bdd88757eedddd53dea46645574f218094573c74 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 18 Dec 2012 12:09:09 -0500 Subject: [PATCH] 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 --- src/common/consumer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; + } } /* -- 2.34.1