From 0bc8b2727156a4aa8a3beddf8da60ab8cf5d20ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Mon, 8 Oct 2007 18:31:44 +0000 Subject: [PATCH] Fix a nasty deadlock in statistics. --- statistics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/statistics.c b/statistics.c index fe847f1..af57581 100644 --- a/statistics.c +++ b/statistics.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: statistics.c,v 1.13 2007/10/08 16:24:48 rahrenbe Exp $ + * $Id: statistics.c,v 1.14 2007/10/08 18:31:44 ajhseppa Exp $ */ #include @@ -138,6 +138,7 @@ void cIptvDeviceStatistics::AddStatistic(long Bytes, u_short pid, long payload) mostActivePids[i].DataAmount += payload; // Now re-sort the array and quit qsort(&mostActivePids, numberOfElements, sizeof(pidStruct), SortPids); + mutex.Unlock(); return; } }