diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index 1a9e58144194a3..ed039229b4e57a 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -491,7 +491,7 @@ EmberAfStatus emberAfScenesClusterStoreCurrentSceneCallback(chip::FabricIndex fa // If the target index is still zero, the table is full. if (index == EMBER_AF_SCENE_TABLE_NULL_INDEX) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfPluginScenesServerRetrieveSceneEntry(entry, index); @@ -758,7 +758,7 @@ bool emberAfPluginScenesServerParseAddScene( // If the target index is still zero, the table is full. if (index == EMBER_AF_SCENE_TABLE_NULL_INDEX) { - status = EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + status = EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; goto kickout; } diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 195def3c87f1e6..646ea32c5565d7 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -39,7 +39,6 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_CONSTRAINT_ERROR = 0x87, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE = 0x88, EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED = 0x89, - EMBER_ZCL_STATUS_INSUFFICIENT_SPACE = 0x89, // Deprecated; same as RESOURCE_EXHAUSTED EMBER_ZCL_STATUS_DUPLICATE_EXISTS = 0x8A, EMBER_ZCL_STATUS_NOT_FOUND = 0x8B, EMBER_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE = 0x8C, diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 1c744552985c34..e30b990546b62d 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -197,7 +197,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb if (realIndex >= MAX_ENDPOINT_COUNT) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } if (id == kInvalidEndpointId) { @@ -207,7 +207,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb auto serverClusterCount = emberAfClusterCountForEndpointType(ep, /* server = */ true); if (dataVersionStorage.size() < serverClusterCount) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } index = static_cast(realIndex); @@ -415,7 +415,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 1) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfCopyString(dest, src, bufferSize - 1); } @@ -423,7 +423,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 2) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfCopyLongString(dest, src, bufferSize - 2); } @@ -431,7 +431,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 2) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } // Just copy the length. @@ -441,7 +441,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (!ignoreReadLength && readLength < am->size) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } if (src == nullptr) { diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index c657ba515b5e3f..4012932b2dc381 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -406,7 +406,7 @@ EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, Attribut } else { // failed, print debug info - if (status == EMBER_ZCL_STATUS_INSUFFICIENT_SPACE) + if (status == EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED) { emberAfAttributesPrintln("READ: attribute size too large for caller"); emberAfAttributesFlush(); diff --git a/src/app/util/generic-callbacks.h b/src/app/util/generic-callbacks.h index f690732081cc44..0da0b07d17ca80 100644 --- a/src/app/util/generic-callbacks.h +++ b/src/app/util/generic-callbacks.h @@ -110,7 +110,7 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste * value of EMBER_ZCL_STATUS_SUCCESS. Ensure that the size of the externally * managed attribute value is smaller than what the buffer can hold. In the case * of a buffer overflow throw an appropriate error such as - * EMBER_ZCL_STATUS_INSUFFICIENT_SPACE. Any other return value indicates the + * EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED. Any other return value indicates the * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,