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.2.6~10 X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=f36ec06cfaf367d66c2f0d6fbfec33d074fd91be 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 de4aab55a..fb52c0d06 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; }