From c8864bdec9c0cfc3f684d74724de6ebfa0fc52a1 Mon Sep 17 00:00:00 2001 From: john Date: Tue, 11 Sep 2012 10:43:11 +0200 Subject: [PATCH] WriteDataByIdentifier should return CNC when callback returns E_NOT_OK but has a positive respcode. --- diagnostic/Dcm/Dcm_Dsp.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2