From 046f46a2b8cce407f26d61e026908829419b3c86 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 9 Jul 2021 01:35:35 +0200 Subject: [PATCH] Zap use chip::ErrorStr into the BasicFilter template of CHIPClientCallbacks.h (#8213) * Use %s for logging the error instead of %d into CHIPClientCallbacks.zapt * Update gen/ folders --- examples/pump-app/pump-common/gen/CHIPClientCallbacks.h | 2 +- .../pump-controller-common/gen/CHIPClientCallbacks.h | 2 +- src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt | 2 +- src/controller/data_model/gen/CHIPClientCallbacks.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/pump-app/pump-common/gen/CHIPClientCallbacks.h b/examples/pump-app/pump-common/gen/CHIPClientCallbacks.h index f83f7fa2d10158..07a3daae5d919b 100644 --- a/examples/pump-app/pump-common/gen/CHIPClientCallbacks.h +++ b/examples/pump-app/pump-common/gen/CHIPClientCallbacks.h @@ -69,7 +69,7 @@ void BasicAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelabl } else { - ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %d", err); + ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %s", chip::ErrorStr(err)); chip::Callback::Callback * cb = chip::Callback::Callback::FromCancelable(onFailure); cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); diff --git a/examples/pump-controller-app/pump-controller-common/gen/CHIPClientCallbacks.h b/examples/pump-controller-app/pump-controller-common/gen/CHIPClientCallbacks.h index f83f7fa2d10158..07a3daae5d919b 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/CHIPClientCallbacks.h +++ b/examples/pump-controller-app/pump-controller-common/gen/CHIPClientCallbacks.h @@ -69,7 +69,7 @@ void BasicAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelabl } else { - ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %d", err); + ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %s", chip::ErrorStr(err)); chip::Callback::Callback * cb = chip::Callback::Callback::FromCancelable(onFailure); cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt index 7d0290f374b125..cd9cb2700da856 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt @@ -52,7 +52,7 @@ void BasicAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelabl } else { - ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %d", err); + ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %s", chip::ErrorStr(err)); chip::Callback::Callback * cb = chip::Callback::Callback::FromCancelable(onFailure); cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); diff --git a/src/controller/data_model/gen/CHIPClientCallbacks.h b/src/controller/data_model/gen/CHIPClientCallbacks.h index 2146f9207f3320..baec826308041b 100644 --- a/src/controller/data_model/gen/CHIPClientCallbacks.h +++ b/src/controller/data_model/gen/CHIPClientCallbacks.h @@ -69,7 +69,7 @@ void BasicAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelabl } else { - ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %d", err); + ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %s", chip::ErrorStr(err)); chip::Callback::Callback * cb = chip::Callback::Callback::FromCancelable(onFailure); cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE);