Skip to content

Commit

Permalink
Remove EMBER_ZCL_STATUS_NOT_AUTHORIZED
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Dec 7, 2022
1 parent c010eec commit f51c3ac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ constexpr pw::Status EmberStatusToPwStatus(EmberAfStatus ember_status)
return pw::OkStatus();
case EMBER_ZCL_STATUS_NOT_FOUND:
return pw::Status::NotFound();
case EMBER_ZCL_STATUS_NOT_AUTHORIZED:
case EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS:
return pw::Status::PermissionDenied();
default:
return pw::Status::Unknown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bool emberAfAccountLoginClusterLoginCallback(app::CommandHandler * command, cons

if (!delegate->HandleLogin(tempAccountIdentifier, setupPin))
{
status = EMBER_ZCL_STATUS_NOT_AUTHORIZED;
status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS;
}

exit:
Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/ias-zone-server/ias-zone-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ EmberAfStatus emberAfPluginIasZoneClusterSetEnrollmentMethod(EndpointId endpoint
if (emberAfIasZoneClusterAmIEnrolled(endpoint))
{
emberAfIasZoneClusterPrintln("Error: Already enrolled");
status = EMBER_ZCL_STATUS_NOT_AUTHORIZED;
status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS;
}
else if (!isValidEnrollmentMode(method))
{
Expand Down
1 change: 0 additions & 1 deletion src/app/util/af-enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ enum EmberAfStatus : uint8_t
EMBER_ZCL_STATUS_FAILURE = 0x01,
EMBER_ZCL_STATUS_INVALID_SUBSCRIPTION = 0x7D,
EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS = 0x7E,
EMBER_ZCL_STATUS_NOT_AUTHORIZED = 0x7E, // Deprecated; same as UNSUPPORTED_ACCESS
EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT = 0x7F,
EMBER_ZCL_STATUS_MALFORMED_COMMAND = 0x80,
EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND = 0x81,
Expand Down
4 changes: 2 additions & 2 deletions src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord,
if (!emberAfAttributeWriteAccessCallback(attRecord->endpoint, attRecord->clusterId,
am->attributeId))
{
return EMBER_ZCL_STATUS_NOT_AUTHORIZED;
return EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS;
}
}
else
Expand All @@ -560,7 +560,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord,
if (!emberAfAttributeReadAccessCallback(attRecord->endpoint, attRecord->clusterId,
am->attributeId))
{
return EMBER_ZCL_STATUS_NOT_AUTHORIZED;
return EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS;
}
}

Expand Down

0 comments on commit f51c3ac

Please sign in to comment.