From: David Goulet Date: Thu, 28 Nov 2013 18:20:15 +0000 (-0500) Subject: Fix: update back the metadata len sent on failure X-Git-Tag: v2.3.2~28 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=23b66cb89f325932b1b311bf3fec20354673de26;p=lttng-tools.git Fix: update back the metadata len sent on failure Acked-by: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 58b8080b5..94aa62a5c 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -478,6 +478,11 @@ push_data: if (ret == -LTTCOMM_CONSUMERD_CHANNEL_FAIL) { ret = 0; } + + /* Update back the actual metadata len sent since it failed here. */ + pthread_mutex_lock(®istry->lock); + registry->metadata_len_sent -= len; + pthread_mutex_unlock(®istry->lock); ret_val = ret; goto error_push; }