diff options
author | xmarvla <vlatko.markovic@seavus.com> | 2011-12-26 11:39:55 +0100 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@seavus.com> | 2012-05-25 14:40:23 +0200 |
commit | f2be658909048b1050bf66c14324cccce852a931 (patch) | |
tree | 6d706961731e8dd2864581491ae4ca8fc6574359 /lcmodule/source/cnh1605204_ldr_transport_layer | |
parent | 7500cbd59a6faa7dd69b278d7a02da2c8fa96060 (diff) |
Flash tool cli cannot work with network path
Resolve problems in error handling for process file command
when path to non-existing file is given as input paramter
to LCDriver.
Fix AStyle code formatting.
ST-Ericsson ID: 402761
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Ia6539a7ebab97a078bc0d105b23b6a0545762194
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43810
Reviewed-by: QABUILD
Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com>
Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Diffstat (limited to 'lcmodule/source/cnh1605204_ldr_transport_layer')
3 files changed, 12 insertions, 1 deletions
diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c index aea0149..4cd38d3 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c @@ -95,9 +95,11 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) A2_SPEEDFLASH_REQ_SIZE, A2_Speedflash_ReadCallback, Communication_p->CommunicationDevice_p); #endif break; + case A2_SPEEDFLASH_WAIT_READ_REQ: /* nothing to do */ break; + case A2_SPEEDFLASH_WRITE_BLOCK: if (NULL != A2_SPEEDFLASH(Communication_p)->Outbound_p) { @@ -110,6 +112,7 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) } break; + case A2_SPEEDFLASH_WAIT_WRITE_BLOCK: /* nothing to do */ break; diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c index 42d3cae..b04d715 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c @@ -512,6 +512,7 @@ ErrorCode_e R15_Bulk_Process(Communication_t *Communication_p, PacketMeta_t *Pac break; #ifndef CFG_ENABLE_LOADER_TYPE + case CMD_BULK_WRITE: if (NULL != R15_TRANSPORT(Communication_p)->BulkCommandCallback_p) { @@ -523,6 +524,7 @@ ErrorCode_e R15_Bulk_Process(Communication_t *Communication_p, PacketMeta_t *Pac ReturnValue = R15_Network_PacketRelease(Communication_p, Packet_p); break; #endif + case CMD_BULK_STATUS: // not implemented. A_(printf("bulk_protocol.c (%d): ** Not implemented bulk command! **\n", __LINE__);) @@ -733,6 +735,7 @@ static ErrorCode_e R15_Bulk_Process_Read(Communication_t *Communication_p, TL_Bu break; #ifndef CFG_ENABLE_LOADER_TYPE + /* coverity[unterminated_case] */ case WAIT_WRITE_REQUEST: BulkVector_p->State = SEND_READ_REQUEST; @@ -961,6 +964,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect break; #ifndef CFG_ENABLE_LOADER_TYPE + case WAIT_TX_DONE: /* Wait for all chunks in the current session to be send before closing @@ -994,6 +998,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect C_(printf("bulk_protocol.c(%d) Write bulk process finished! \n", __LINE__);) break; #ifndef CFG_ENABLE_LOADER_TYPE + case CANCEL_BULK: { uint32 Counter; @@ -1015,6 +1020,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } break; #endif + default: BulkVector_p->State = BULK_IDLE_STATE; break; @@ -1191,7 +1197,7 @@ static void R15_Bulk_ReadChunkCallBack(Communication_t *Communication_p, const v { TL_BulkVectorList_t *BulkVector_p = R15_TRANSPORT(Communication_p)->BulkHandle.BulkVector_p; - if(NULL == BulkVector_p) { + if (NULL == BulkVector_p) { A_(printf("bulk_protocol.c(%d) Bulk Vector released! \n", __LINE__);) return; } diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c index 925d722..893412f 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c @@ -131,8 +131,10 @@ ErrorCode_e R15_Transport_Poll(Communication_t *Communication_p) switch (Packet_p->Header.Protocol) { case PROTO_BULK: return R15_Bulk_Process(Communication_p, Packet_p); + case PROTO_COMMAND: return R15_Command_Process(Communication_p, Packet_p); + default: return E_SUCCESS; } |