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%.
This commit is contained in:
schmirl 2007-04-23 11:33:26 +00:00
parent c515e82f04
commit 35bfac507b

View File

@ -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" #include "client/filter.h"
@ -67,8 +67,10 @@ cStreamdevFilter::cStreamdevFilter(u_short Pid, u_char Tid, u_char Mask) {
cStreamdevFilter::~cStreamdevFilter() { cStreamdevFilter::~cStreamdevFilter() {
Dprintf("~cStreamdevFilter %p\n", this); 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) if (m_Pipe[1] >= 0)
close(m_Pipe[1]); close(m_Pipe[1]);
} }