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.4.0-rc2~19 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ffa3f2455c34da70fa040a3170e748889802cbf0 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 72a3223c1..73c6d6a0f 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -495,6 +495,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; }