X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/cb205396ae920ef813764de92bf5b686bb9d80f1..347a471b63ec3c0fdcee0368378f8f5d5e1e9ca4:/lib/base/filepush.cpp diff --git a/lib/base/filepush.cpp b/lib/base/filepush.cpp index b85edbc1..5413f048 100644 --- a/lib/base/filepush.cpp +++ b/lib/base/filepush.cpp @@ -38,7 +38,7 @@ void eFilePushThread::thread() eDebug("eFilePushThread *write error* - not yet handled"); // ... we would stop the thread } - printf("FILEPUSH: wrote %d bytes\n", w); +// printf("FILEPUSH: wrote %d bytes\n", w); m_buf_start += w; continue; } @@ -53,7 +53,17 @@ void eFilePushThread::thread() continue; eDebug("eFilePushThread *read error* - not yet handled"); } - printf("FILEPUSH: read %d bytes\n", m_buf_end); + if (m_buf_end == 0) + { + eDebug("FILEPUSH: end-of-file! (currently unhandled)"); + if (!lseek(m_fd_source, 0, SEEK_SET)) + { + eDebug("(looping)"); + continue; + } + break; + } +// printf("FILEPUSH: read %d bytes\n", m_buf_end); } eDebug("FILEPUSH THREAD STOP");