From: john Date: Tue, 11 Sep 2012 08:43:11 +0000 (+0200) Subject: WriteDataByIdentifier should return CNC when callback returns E_NOT_OK but has a... X-Git-Url: https://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/c8864bdec9c0cfc3f684d74724de6ebfa0fc52a1 WriteDataByIdentifier should return CNC when callback returns E_NOT_OK but has a positive respcode. --- diff --git a/diagnostic/Dcm/Dcm_Dsp.c b/diagnostic/Dcm/Dcm_Dsp.c index bb5cbad2..77928f64 100644 --- a/diagnostic/Dcm/Dcm_Dsp.c +++ b/diagnostic/Dcm/Dcm_Dsp.c @@ -1265,6 +1265,9 @@ static Dcm_NegativeResponseCodeType writeDidData(const Dcm_DspDidType *didPtr, c if (result == E_OK) { if (didLen == writeDidLen) { /** @req DCM473 */ result = didPtr->DspDidWriteDataFnc(&pduRxData->SduDataPtr[3], (uint8)didLen, &responseCode); /** @req DCM395 */ + if( result != E_OK && responseCode == DCM_E_POSITIVERESPONSE ) { + responseCode = DCM_E_CONDITIONSNOTCORRECT; + } } else { responseCode = DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT;