summaryrefslogtreecommitdiff
path: root/source/LCDriverMethods.cpp
diff options
context:
space:
mode:
authorXVSALGE <xvsalge@ubuntu.(none)>2011-11-02 13:33:50 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:37:00 +0200
commitc60e5c40802a7f14e9005eb9f462c6f741b1e839 (patch)
treea14c31bdd639e696a8844592b3b57a975d8a1f06 /source/LCDriverMethods.cpp
parent637740b7d9a5b9788e50e926b6cb459489cffa0c (diff)
LCD\LCM crash when flashing 7 USB devices
Back changes from R1U/R1S LCD/LCM release. Bug fixing for retransmission. ST-Ericsson ID: 369904 ST-Ericsson FOSS-OUT ID: NA Change-Id: I0498cbaecea78651418d11ea2643fcafa3ac4880 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35975 Reviewed-by: QATOOLS Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Reviewed-by: QABUILD Tested-by: Vlatko STENKOSKI Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Diffstat (limited to 'source/LCDriverMethods.cpp')
-rw-r--r--source/LCDriverMethods.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp
index ca44754..a24e5b9 100644
--- a/source/LCDriverMethods.cpp
+++ b/source/LCDriverMethods.cpp
@@ -92,6 +92,7 @@ CLCDriverMethods::CLCDriverMethods(const char *pchInterfaceId):
CLCDriverMethods::~CLCDriverMethods()
{
m_EventQueue.SignalEvent();
+ CLockCS lock(LCDMethodsCS);
OS::Sleep(200);
if (0 != m_pMainThread) {
@@ -330,16 +331,16 @@ ErrorCode_e CLCDriverMethods::CEH_A2_CallbackFunction(void *pObject, CommandData
//----------------------------------------
-void CLCDriverMethods::BulkCommandReqCallback(void *pObject, uint16 *puiSession, uint32 *puiChunkSize, uint64 *puiOffset, uint32 *puiLength, boolean bAckRead)
+void CLCDriverMethods::BulkCommandReqCallback(void *pObject, uint16 uiSession, uint32 uiChunkSize, uint64 uiOffset, uint32 uiLength, boolean bAckRead)
{
CLCDriverMethods *pLcdMethods = static_cast<CLCDriverMethods *>(pObject);
- return pLcdMethods->m_pBulkHandler->HandleCommandRequest(*puiSession, *puiChunkSize, *puiOffset, *puiLength, bAckRead ? true : false);
+ return pLcdMethods->m_pBulkHandler->HandleCommandRequest(uiSession, uiChunkSize, uiOffset, uiLength, bAckRead ? true : false);
}
-void CLCDriverMethods::BulkDataReqCallback(void *pObject, uint16 *puiSession, uint32 *puiChunkSize, uint64 *puiOffset, uint32 *puiLength, uint64 *puiTotalLength, uint32 *puiTransferedLength)
+void CLCDriverMethods::BulkDataReqCallback(void *pObject, uint16 uiSession, uint32 uiChunkSize, uint64 uiOffset, uint32 uiLength, uint64 uiTotalLength, uint32 uiTransferedLength)
{
CLCDriverMethods *pLcdMethods = static_cast<CLCDriverMethods *>(pObject);
- return pLcdMethods->Do_BulkDataReqCallback(puiSession, puiChunkSize, puiOffset, puiLength, puiTotalLength, puiTransferedLength);
+ return pLcdMethods->Do_BulkDataReqCallback(uiSession, uiChunkSize, uiOffset, uiLength, uiTotalLength, uiTransferedLength);
}
void CLCDriverMethods::BulkDataEndOfDumpCallback(void *pObject)
@@ -907,6 +908,7 @@ int CLCDriverMethods::Do_Flash_ProcessFile(const char *pchPath, const char *pchT
#endif
if (iUseBulk) {
+ CLockCS lock(LCDMethodsCS);
m_pLcmInterface->BulkSetCallbacks((void *)BulkCommandReqCallback, (void *)BulkDataReqCallback, (void *)BulkDataEndOfDumpCallback);
VERIFY_SUCCESS(m_pBuffers->AllocateBulkFile(pchPath));
uint64 uiLength = m_pBuffers->GetBulkFileLength();
@@ -2618,9 +2620,9 @@ int CLCDriverMethods::WaitForPROTROMResponseOrCancelOrTimeout(int iReceivePdu)
return iResult;
}
-void CLCDriverMethods::Do_BulkDataReqCallback(uint16 *Session_p, uint32 *ChunkSize_p, uint64 *Offset_p, uint32 *Length_p, uint64 *TotalLength_p, uint32 *TransferredLength_p)
+void CLCDriverMethods::Do_BulkDataReqCallback(uint16 Session, uint32 ChunkSize, uint64 Offset, uint32 Length, uint64 TotalLength, uint32 TransferredLength)
{
- m_uiBulkTransferred += *ChunkSize_p;
+ m_uiBulkTransferred += ChunkSize;
}
void CLCDriverMethods::UpdateBulkProgress()