summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 84a6fca3d6..e2057d17ab 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -522,6 +522,8 @@ static void update_data_counters(void)
size_t remaining = 0;
size_t useful = 0;
+ mutex_lock(&llist_mutex);
+
m = first_handle;
while (m) {
buffered += m->available;
@@ -537,6 +539,8 @@ static void update_data_counters(void)
m = m->next;
}
+ mutex_unlock(&llist_mutex);
+
data_counters.buffered = buffered;
data_counters.wasted = wasted;
data_counters.remaining = remaining;