diff options
author | kos <kos@dev3> | 2013-11-04 12:34:27 (GMT) |
---|---|---|
committer | kos <kos@dev3> | 2013-11-04 12:34:27 (GMT) |
commit | 824a37ccd527bca6d922c29fd0decec52a3214be (patch) | |
tree | 2128349b4f3adbb40c81bd879b35fcd36dd9880d | |
parent | b9eccfef44d067ad8b50fc40a48c0d3a1b1872d8 (diff) |
remove unused code at filepumpthread.
-rw-r--r-- | src/eFilePumpThread.cpp | 13 | ||||
-rw-r--r-- | src/eFilePumpThread.h | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/eFilePumpThread.cpp b/src/eFilePumpThread.cpp index c15cae9..efa3584 100644 --- a/src/eFilePumpThread.cpp +++ b/src/eFilePumpThread.cpp @@ -24,7 +24,7 @@ #endif eFilePumpThread::eFilePumpThread(int aDeviceFd) - : mDeviceFd(aDeviceFd), mFileFd(0), mFileSize(0), mTermFlag(false), + : mDeviceFd(aDeviceFd), mFileFd(0), mTermFlag(false), uThread("FilePumpThread", TYPE_DETACHABLE) { } @@ -42,8 +42,6 @@ bool eFilePumpThread::Open(std::string aFileName) if(mFileFd <= 0) { return false; } - mFileSize = lseek(mFileFd, 0, SEEK_END); - SeekOffset(0); return true; } //------------------------------------------------------------------------------- @@ -59,11 +57,10 @@ void eFilePumpThread::Close() void eFilePumpThread::SeekOffset(int aOffset) { - int offset = aOffset; - if(offset > mFileSize) { - offset = mFileSize; - } - lseek(mFileFd, offset, SEEK_SET); +#ifdef DEBUG_LOG + LOG("lseek to %d", aOffset); +#endif + lseek(mFileFd, aOffset, SEEK_SET); } //------------------------------------------------------------------------------- diff --git a/src/eFilePumpThread.h b/src/eFilePumpThread.h index 62f3715..79e2a8e 100644 --- a/src/eFilePumpThread.h +++ b/src/eFilePumpThread.h @@ -14,8 +14,8 @@ class eFilePumpThread : public uThread { private: + int mFileFd; int mDeviceFd; - int mFileFd, mFileSize; bool mTermFlag; protected: |