git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8810148
)
in case of short reads, re-align with blocksize
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 24 May 2007 20:09:57 +0000
(20:09 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 24 May 2007 20:09:57 +0000
(20:09 +0000)
lib/base/filepush.cpp
patch
|
blob
|
history
diff --git
a/lib/base/filepush.cpp
b/lib/base/filepush.cpp
index 1e5685caed94448f29bc8d573c88d8315c51896f..2a894cf5a81c0365730b84cbdd8f2318a304133e 100644
(file)
--- a/
lib/base/filepush.cpp
+++ b/
lib/base/filepush.cpp
@@
-174,6
+174,15
@@
void eFilePushThread::thread()
}
eDebug("eFilePushThread *read error* (%m) - not yet handled");
}
+
+ /* a read might be mis-aligned in case of a short read. */
+ int d = m_buf_end % m_blocksize;
+ if (d)
+ {
+ m_raw_source.lseek(-d, SEEK_CUR);
+ m_buf_end -= d;
+ }
+
if (m_buf_end == 0)
{
/* on EOF, try COMMITting once. */