From a93bf164bc58ac2dfd11d5ca6373bfc53e10a0ce Mon Sep 17 00:00:00 2001 From: john Date: Mon, 27 Aug 2012 16:42:11 +0200 Subject: [PATCH] Passing back NRC from writeData-callback. --- diagnostic/Dcm/Dcm_Dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diagnostic/Dcm/Dcm_Dsp.c b/diagnostic/Dcm/Dcm_Dsp.c index f3eb4271..6c8627c7 100644 --- a/diagnostic/Dcm/Dcm_Dsp.c +++ b/diagnostic/Dcm/Dcm_Dsp.c @@ -1178,7 +1178,7 @@ 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, &errorCode); /** @req DCM395 */ - if ((result != E_OK) || (errorCode != DCM_E_POSITIVERESPONSE)) { + if ((result != E_OK) && (errorCode == DCM_E_POSITIVERESPONSE)) { responseCode = DCM_E_CONDITIONSNOTCORRECT; } } -- 2.39.2