From: ghost Date: Wed, 9 Dec 2009 13:58:12 +0000 (+0100) Subject: filepush.cpp: no infinite wait until driver EOF.. better we check it more times.. X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=2eccebcc6bac4cd66864de0342fe4eede4029537 filepush.cpp: no infinite wait until driver EOF.. better we check it more times.. --- diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp index ba30322..91f24ba 100644 --- a/lib/base/filepush.cpp +++ b/lib/base/filepush.cpp @@ -187,12 +187,21 @@ void eFilePushThread::thread() /* on EOF, try COMMITting once. */ if (m_send_pvr_commit) { - eDebug("sending PVR commit"); struct pollfd pfd; pfd.fd = m_fd_dest; pfd.events = POLLIN; - poll(&pfd, 1, -1); - eDebug("commit done"); + switch (poll(&pfd, 1, 250)) // wait for 250ms + { + case 0: + eDebug("wait for driver eof timeout"); + continue; + case 1: + eDebug("wait for driver eof ok"); + break; + default: + eDebug("wait for driver eof aborted by signal"); + continue; + } } /* in stream_mode, we are sending EOF events