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.
diff -ru xineliboutput-1.0.0pre6-orig/frontend_svr.c xineliboutput-1.0.0pre6/frontend_svr.c
--- xineliboutput-1.0.0pre6-orig/frontend_svr.c	2006-12-03 15:43:32.601759070 +0100
+++ xineliboutput-1.0.0pre6/frontend_svr.c	2006-12-03 15:45:25.524741697 +0100
@@ -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)
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to