summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/LCDriver.rc2
-rw-r--r--source/LCM/Hash.cpp3
-rw-r--r--source/LCM/include/t_protrom_header.h2
-rw-r--r--source/LcdVersion.cpp2
-rw-r--r--source/api_wrappers/linux/CEventObject.cpp11
-rw-r--r--source/api_wrappers/linux/CSemaphore.cpp10
-rw-r--r--source/api_wrappers/linux/CSemaphore.h2
-rw-r--r--source/utilities/BulkHandler.cpp1
8 files changed, 23 insertions, 10 deletions
diff --git a/source/LCDriver.rc b/source/LCDriver.rc
index 06d4ffb..fdf0284 100644
--- a/source/LCDriver.rc
+++ b/source/LCDriver.rc
@@ -89,7 +89,7 @@ BEGIN
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2012"
VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "P3Y"
+ VALUE "ProductVersion", "P4Y"
END
END
BLOCK "VarFileInfo"
diff --git a/source/LCM/Hash.cpp b/source/LCM/Hash.cpp
index 1b6efd5..2b5e3b1 100644
--- a/source/LCM/Hash.cpp
+++ b/source/LCM/Hash.cpp
@@ -78,7 +78,7 @@ void *Hash::WorkerThread(void *arg)
HashRequest *request = 0;
while (true) {
- RemoveResult result = pThis->m_RequestQueue->RemoveHead((void**)(&request), INFINITE);
+ RemoveResult result = pThis->m_RequestQueue->RemoveHead((void **)(&request), INFINITE);
if (REMOVE_SUCCESS != result) {
break;
@@ -91,6 +91,7 @@ void *Hash::WorkerThread(void *arg)
if (request->Length != 0) {
SecurityAlgorithms::SHA256(request->Data_p, request->Length, request->Hash_p);
}
+
break;
case HASH_CRC16:
diff --git a/source/LCM/include/t_protrom_header.h b/source/LCM/include/t_protrom_header.h
index 63ae6ef..e8f52c4 100644
--- a/source/LCM/include/t_protrom_header.h
+++ b/source/LCM/include/t_protrom_header.h
@@ -32,8 +32,6 @@
#define PROTROM_HEADER_LENGTH 7
/** Value of the reserved field */
#define PROTROM_RESERVED_FIELD 0x00
-/** Offset of the header in the buffer */
-#define HEADER_OFFSET_IN_BUFFER 8
/**
* Header search results
diff --git a/source/LcdVersion.cpp b/source/LcdVersion.cpp
index 538bba8..f95c525 100644
--- a/source/LcdVersion.cpp
+++ b/source/LcdVersion.cpp
@@ -18,6 +18,6 @@
* This table contains compatibility information for the versions of LCM.
* Current LCM version is defined in file lcm_version.c in LCM code.
*/
-const char *LCD_LCM_CompatibilityList[] = {"P3Y",
+const char *LCD_LCM_CompatibilityList[] = {"P4Y",
NULL
};
diff --git a/source/api_wrappers/linux/CEventObject.cpp b/source/api_wrappers/linux/CEventObject.cpp
index 6c0f6c3..1a09fa9 100644
--- a/source/api_wrappers/linux/CEventObject.cpp
+++ b/source/api_wrappers/linux/CEventObject.cpp
@@ -20,13 +20,17 @@ CEventObject::CEventObject()
{
char sem_name[SEM_NAME_MAX_LENGTH];
int sem_nr = 1;
- while(sem_nr <= SEM_MAX_NR) {
+
+ while (sem_nr <= SEM_MAX_NR) {
snprintf(sem_name, SEM_NAME_MAX_LENGTH, "lcdriversem_%d", sem_nr);
/* open semaphore with "rw" permissions for everyone - 0666 */
m_sem = sem_open(sem_name, O_CREAT | O_EXCL, 0666 , 0);
- if (m_sem != SEM_FAILED)
+
+ if (m_sem != SEM_FAILED) {
break;
+ }
+
sem_nr++;
}
}
@@ -69,6 +73,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout)
/* Try to lock the semaphore */
ret = sem_trywait(m_sem);
+
if (ret != 0) {
while (dwTimePassed < dwTimeout) {
/* Sleep 1ms */
@@ -76,6 +81,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout)
/* Try to lock the semaphore again*/
ret = sem_trywait(m_sem);
+
if (ret == 0) {
return WAIT_OBJECT_0;
}
@@ -85,6 +91,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout)
dwTimePassed = 1000 * (curr_time.tv_sec - start_time.tv_sec) + \
(curr_time.tv_usec - start_time.tv_usec) / 1000;
}
+
return WAIT_TIMEOUT;
}
}
diff --git a/source/api_wrappers/linux/CSemaphore.cpp b/source/api_wrappers/linux/CSemaphore.cpp
index 5dae856..166ab88 100644
--- a/source/api_wrappers/linux/CSemaphore.cpp
+++ b/source/api_wrappers/linux/CSemaphore.cpp
@@ -16,13 +16,17 @@ CSemaphore::CSemaphore(unsigned int initial_count)
{
char sem_name[SEM_NAME_MAX_LENGTH];
int sem_nr = 1;
- while(sem_nr <= SEM_MAX_NR) {
+
+ while (sem_nr <= SEM_MAX_NR) {
snprintf(sem_name, SEM_NAME_MAX_LENGTH, "lcdriversem_%d", sem_nr);
/* open semaphore with "rw" permissions for everyone - 0666 */
m_semaphore = sem_open(sem_name, O_CREAT | O_EXCL, 0666 , 0);
- if (m_semaphore != SEM_FAILED)
+
+ if (m_semaphore != SEM_FAILED) {
break;
+ }
+
sem_nr++;
}
}
@@ -60,6 +64,7 @@ DWORD CSemaphore::Wait(DWORD timeout)
/* Try to lock the semaphore */
ret = sem_trywait(m_semaphore);
+
if (ret != 0) {
while (dwTimePassed < timeout) {
/* Sleep 1ms */
@@ -67,6 +72,7 @@ DWORD CSemaphore::Wait(DWORD timeout)
/* Try to lock the semaphore again*/
ret = sem_trywait(m_semaphore);
+
if (ret == 0) {
return WAIT_OBJECT_0;
}
diff --git a/source/api_wrappers/linux/CSemaphore.h b/source/api_wrappers/linux/CSemaphore.h
index 0abe5dd..3d68b63 100644
--- a/source/api_wrappers/linux/CSemaphore.h
+++ b/source/api_wrappers/linux/CSemaphore.h
@@ -19,7 +19,7 @@ public:
DWORD Wait(DWORD timeout = INFINITE);
private:
- sem_t* m_semaphore;
+ sem_t *m_semaphore;
};
#endif /* _CSEMAPHORE_H */
diff --git a/source/utilities/BulkHandler.cpp b/source/utilities/BulkHandler.cpp
index bd8af8f..4e790c8 100644
--- a/source/utilities/BulkHandler.cpp
+++ b/source/utilities/BulkHandler.cpp
@@ -191,6 +191,7 @@ void BulkHandler::HandleRxSessionEnd(uint16 session, uint32 chunkSize, uint64 of
m_Methods->UpdateBulkProgress();
ErrorExit:
+
if (E_SUCCESS != ReturnValue) {
m_Methods->SignalError(ReturnValue);
}