vdr 1.4.4 / xineliboutput 1.0.0_pre6 causes complete system freeze
Commit Message
Hi Jose,
On Sunday 03 December 2006 12:45, Jose Alberto Reguero wrote:
> I have the same problem.
> See:
> http://linuxtv.org/pipermail/vdr/2006-September/010628.html
> The attached patch work for me.
Thanks for your tip. Just when I was about to give it a try, the attached
patch was added to the gentoo vdr ebuild which totally fixed my problems. So
far, no more crashes at all.
Both patches (the one I attached and the one you pointed me to) work on the
same area... this one though doesn't revert the changes but instead fixes
them. :-)
I hope this helps others too... and I sure hope this gets into the next
xinelibout release since it seems to be a pretty common problem now. :-(
Thanks again,
matthew.
@@ -1240,7 +1240,8 @@
void cXinelibServer::Read_Control(int cli)
{
- while(read(fd_control[cli], &m_CtrlBuf[ cli ][ m_CtrlBufPos[cli] ], 1) == 1) {
+ int n;
+ while((n = read(fd_control[cli], &m_CtrlBuf[ cli ][ m_CtrlBufPos[cli] ], 1)) == 1) {
++m_CtrlBufPos[cli];
@@ -1264,6 +1265,10 @@
m_CtrlBufPos[cli] = 0;
}
}
+ if (n == 0) {
+ LOGMSG("Client connection %d closed", cli);
+ CloseConnection(cli);
+ }
}
void cXinelibServer::Handle_ClientConnected(int fd)