From 35bfac507b1483f3d53a5e4c9e8bd1c653e4d647 Mon Sep 17 00:00:00 2001 From: schmirl Date: Mon, 23 Apr 2007 11:33:26 +0000 Subject: [PATCH] client_filter-close-fix.patch by Petri Hintukainen - Do not close receiving side of section pipe. Ownership of handle has been transferred to VDR section handler when filter was opened. Closing handle twice results closing random file handle. If this handle is laready used by another section filter pipe (very likely), VDR section handler CPU usage will rise to 100%. --- client/filter.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/filter.c b/client/filter.c index c8769db..8cdd0ea 100644 --- a/client/filter.c +++ b/client/filter.c @@ -1,5 +1,5 @@ /* - * $Id: filter.c,v 1.6 2007/04/23 11:30:55 schmirl Exp $ + * $Id: filter.c,v 1.7 2007/04/23 11:33:26 schmirl Exp $ */ #include "client/filter.h" @@ -67,8 +67,10 @@ cStreamdevFilter::cStreamdevFilter(u_short Pid, u_char Tid, u_char Mask) { cStreamdevFilter::~cStreamdevFilter() { Dprintf("~cStreamdevFilter %p\n", this); - if (m_Pipe[0] >= 0) - close(m_Pipe[0]); + + // ownership of handle m_Pipe[0] has been transferred to VDR section handler + //if (m_Pipe[0] >= 0) + // close(m_Pipe[0]); if (m_Pipe[1] >= 0) close(m_Pipe[1]); }