diff options
Diffstat (limited to 'lcmodule/source/cnh1606344_ldr_communication_module')
5 files changed, 14 insertions, 20 deletions
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl index d4a8672..e0a2302 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl @@ -197,6 +197,7 @@ ErrorCode_e Do_CEH_Call(void *Object_p, CommandData_t *CmdData_p) ErrorCode_e AuditResponse = CommandAudit(CmdData_p); CommandData_t CmdData = {0}; uint32 PLSize = sizeof(ErrorCode_e); + uint8 AuditResponseData[PLSize]; if (E_SUCCESS != AuditResponse) { @@ -207,31 +208,18 @@ ErrorCode_e Do_CEH_Call(void *Object_p, CommandData_t *CmdData_p) CmdData.ApplicationNr = CmdData_p->ApplicationNr; CmdData.SessionNr = CmdData_p->SessionNr; CmdData.Payload.Size = PLSize; - CmdData.Payload.Data_p = NULL; - CmdData.Payload.Data_p = (uint8 *)malloc(PLSize); - - if (NULL == CmdData.Payload.Data_p) { - A_(printf("command_marshal.c (%d): ** memory allocation failed! **\n", __LINE__);) - return E_ALLOCATE_FAILED; - } + CmdData.Payload.Data_p = AuditResponseData; Data_p = CmdData.Payload.Data_p; put_uint32(&Data_p, AuditResponse); Status = Do_R15_Command_Send(GlobalCommunication_p, &CmdData); - if (NULL != CmdData.Payload.Data_p) { - - free(CmdData.Payload.Data_p); - } - if (E_SUCCESS != Status) { - return Status; } if (E_UNSUPPORTED_CMD == AuditResponse) { - Status = Do_System_ShutDownImpl(CmdData.SessionNr); } diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl index 9919b3d..a0b879a 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl @@ -81,9 +81,9 @@ </when> <when test="@type='buffer' and @length!='*'">put_block(&Data_p, <value-of select="@name" />, <value-of select="@length" />); </when> - <when test="@type='SupportedCommand' and @length!='*'">if (<value-of select="@name" /> != NULL) { - put_block(&Data_p, <value-of select="@name" />, PLSize<value-of select="@name" />); - } + <when test="@type='SupportedCommand' and @length!='*'"> if (<value-of select="@name" /> != NULL) { + put_block(&Data_p, <value-of select="@name" />, PLSize<value-of select="@name" />); + } </when> <when test="@type='ListDevice' and @length!='*'">serialize_device_entries(&Data_p, <value-of select="@name" />, <value-of select="@length" />);<!--put_block(&Data_p, <value-of select="@name" />, PLSize<value-of select="@name" />);--> </when> @@ -106,7 +106,7 @@ </when> <when test="@type='buffer' and @length!='*'">PLSize += <value-of select="@length" />; </when> - <when test="@type='SupportedCommand' and @length!='*'">PLSize += PLSize<value-of select="@name" /> = <value-of select="@length" /> * sizeof(SupportedCommand_t); + <when test="@type='SupportedCommand' and @length!='*'"> PLSize += PLSize<value-of select="@name" /> = <value-of select="@length" /> * sizeof(SupportedCommand_t); </when> <when test="@type='ListDevice' and @length!='*'">PLSize += get_device_entries_len(<value-of select="@name" />, <value-of select="@length" />); <!--PLSize<value-of select="@name" /> = <value-of select="@length" /> * sizeof(DirEntry_t);--> </when> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml index 22251d4..459edac 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml @@ -17,6 +17,7 @@ <value number="52" name="E_INVALID_CURRDATE_STRING_LENGTH" fatal="false" short="Indicate that the currdate string array variable has invalid length."> Try to reset the loader and if problem still exist, report this error.</value> <value number="53" name="E_UNALIGNED_DATA" fatal="false" short="Indicate that a variable is not aligned."> Try to reset the loader and if still exist the problem, report this error.</value> <value number="54" name="E_COPS_DEAUTHENTICATION_FAILED" fatal="false" short="Indicate that ME De-Authentication failed."> Try to reset the loader and if still exist the problem, report this error.</value> + <value number="55" name="E_CS_LOCK_FAILED" fatal="false" short="Failed to lock code region protected with critical section."> Loader internal error which should be handled in place where code is executed. Try to reset the loader and if still exist the problem, report this error.</value> <!-- * IO Fatal 100-150 @@ -75,6 +76,7 @@ <value number="261" name="E_PREVIOUS_BULK_SESSION_IS_NOT_CLOSED" fatal="false" short="Previous bulk session not closed.">Try to reset the loader. If the problem still exist, report this error.</value> <value number="262" name="E_INVALID_BULK_PROTOCOL_STATE" fatal="false" short="Invalid bulk protocol state.">Try to reset the loader. If the problem still exist, report this error.</value> <value number="263" name="E_UNSUPPORTED_USB_TRANSFER_TYPE" fatal="false" short="Type of transfer is unsupported.">USB bulk transfer in DMA mode 1 is only supported.</value> + <value number="264" name="E_RETRANSMISSION_LIST_FULL" fatal="false" short="Packet can't be registered for retransmission because retransmission list is full.">All entries in the retransmission list are allocated. No place for new packet to be registered in the retransmission list.</value> <!-- * Signature Fatal 300-350 diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c index 9ceab4c..775b5bf 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c @@ -243,7 +243,11 @@ ErrorCode_e Do_Communication_Shutdown(Communication_t **Communication_pp) DestroyBufferInterface(Communication_p); DestroyTimerInterface(Communication_p); DestroyQueueInterface(Communication_p); - free(Communication_p->Functions_p); + + if (NULL != Communication_p->Functions_p) { + free(Communication_p->Functions_p); + Communication_p->Functions_p = NULL; + } memset(Communication_p, 0, sizeof(Communication_t)); diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c index 224e4fb..b95f288 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c @@ -13,6 +13,6 @@ * LCD_LCM_CompatibilityList in file LcdVersion.cpp in LCD code. */ -char LCM_CurrentVersion[] = "P4Y"; +char LCM_CurrentVersion[] = "P5Y"; /** @} */ |