diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/LCDriver.rc | 4 | ||||
-rw-r--r-- | source/config/commands_h.xsl | 2 | ||||
-rw-r--r-- | source/utilities/BulkHandler.h | 5 | ||||
-rw-r--r-- | source/utilities/CaptiveThreadObject.cpp | 3 | ||||
-rw-r--r-- | source/utilities/MemMappedFile.cpp | 10 | ||||
-rw-r--r-- | source/utilities/MemMappedFile.h | 2 |
6 files changed, 15 insertions, 11 deletions
diff --git a/source/LCDriver.rc b/source/LCDriver.rc index ec7b73a..de492cd 100644 --- a/source/LCDriver.rc +++ b/source/LCDriver.rc @@ -81,7 +81,7 @@ BEGIN BEGIN
BLOCK "000904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-05-18"
+ VALUE "Comments", "Build date: 2011-05-30"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCDriver Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
@@ -90,7 +90,7 @@ BEGIN VALUE "OriginalFilename", "LCDriver_CNH1606432.dll"
VALUE "PrivateBuild", "http://gerrit.lud.stericsson.com/gerrit/21155"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "Test Version"
+ VALUE "ProductVersion", "P1K"
END
END
BLOCK "VarFileInfo"
diff --git a/source/config/commands_h.xsl b/source/config/commands_h.xsl index 36a2356..431a046 100644 --- a/source/config/commands_h.xsl +++ b/source/config/commands_h.xsl @@ -39,9 +39,9 @@ public: } <apply-templates select="group"/> protected: - CLCDriverMethods* lcdMethods_; CmdResult* cmdResult_; LcmInterface* lcmInterface_; + CLCDriverMethods* lcdMethods_; }; #endif /* _COMMANDS_H_ */ diff --git a/source/utilities/BulkHandler.h b/source/utilities/BulkHandler.h index 71147ab..b441a67 100644 --- a/source/utilities/BulkHandler.h +++ b/source/utilities/BulkHandler.h @@ -56,14 +56,15 @@ public: void HandleCommandRequest(uint16 session, uint32 chunkSize, uint64 offset, uint32 length, bool acknowledge); private: CLCDriverMethods *m_Methods; + CSemaphoreQueue m_ReceiveQueue; Buffers *m_pBuffers; LcmInterface *m_pLcmInterface; Logger *m_pLogger; BulkState m_State; + CThreadWrapper *m_pFileWriteThread; TL_BulkVectorList_t *m_pBulkVector; std::string m_sFilePath; - CSemaphoreQueue m_ReceiveQueue; - CThreadWrapper *m_pFileWriteThread; + private: void HandleReadRequest(uint16 session, uint32 chunkSize, uint64 offset, uint32 length); void HandleWriteRequest(uint16 session, uint32 chunkSize, uint64 offset, uint32 length); diff --git a/source/utilities/CaptiveThreadObject.cpp b/source/utilities/CaptiveThreadObject.cpp index e9eb472..052bbce 100644 --- a/source/utilities/CaptiveThreadObject.cpp +++ b/source/utilities/CaptiveThreadObject.cpp @@ -17,11 +17,10 @@ CCaptiveThreadObject::CCaptiveThreadObject() : IsDying(0), -#pragma warning(disable: 4355) // 'this' used before initialized but ok as thread starts in inactive state Thread(ThreadEntry, this) { } -#pragma warning(default: 4355) + CCaptiveThreadObject::~CCaptiveThreadObject() { diff --git a/source/utilities/MemMappedFile.cpp b/source/utilities/MemMappedFile.cpp index 287c5b9..8d5905d 100644 --- a/source/utilities/MemMappedFile.cpp +++ b/source/utilities/MemMappedFile.cpp @@ -71,7 +71,10 @@ int MemMappedFile::LoadFileData(const char *path) return FILE_OPENING_ERROR; } - size_ = ::GetFileSize(handle_, NULL); + uint64 SizeHigh = 0; + + size_ = ::GetFileSize(handle_, (LPDWORD)&SizeHigh); + size_ = (SizeHigh << 32) | size_; if (0 == size_) { return 0; @@ -113,8 +116,9 @@ int MemMappedFile::LoadFileData(const char *path) size_ = fileStat.st_size; - mappedData_ = static_cast<uint8 *>(mmap(0, size_, PROT_READ, MAP_PRIVATE | MAP_POPULATE, descriptor_, 0)); - + /* alway return MAP_FAILED to prevent memory consumption */ + mappedData_ = (uint8 *)MAP_FAILED; //static_cast<uint8 *>(mmap(0, size_, PROT_READ, MAP_PRIVATE /*| MAP_POPULATE*/, descriptor_, 0)); + if (MAP_FAILED != mappedData_) { isMapped_ = true; } else { diff --git a/source/utilities/MemMappedFile.h b/source/utilities/MemMappedFile.h index 8cc63f5..7995365 100644 --- a/source/utilities/MemMappedFile.h +++ b/source/utilities/MemMappedFile.h @@ -27,9 +27,9 @@ private: std::string path_; uint64 size_; bool isMapped_; - uint32 alignmentLength_; uint8 *mappedData_; int error_; + uint32 alignmentLength_; #ifdef _WIN32 HANDLE handle_; HANDLE memmap_; |