Skip to content

Commit

Permalink
Remove WELL from empty/uninitialized error names
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Nov 30, 2023
1 parent 03efab5 commit 805b4ab
Show file tree
Hide file tree
Showing 35 changed files with 96 additions and 97 deletions.
5 changes: 2 additions & 3 deletions docs/ERROR_CODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ This file was **AUTOMATICALLY** generated by
| 25 | 0x19 | `CHIP_ERROR_BUFFER_TOO_SMALL` |
| 26 | 0x1A | `CHIP_ERROR_DUPLICATE_KEY_ID` |
| 27 | 0x1B | `CHIP_ERROR_WRONG_KEY_TYPE` |
| 28 | 0x1C | `CHIP_ERROR_WELL_UNINITIALIZED` |
| 29 | 0x1D | `CHIP_ERROR_WELL_EMPTY` |
| 28 | 0x1C | `CHIP_ERROR_UNINITIALIZED` |
| 29 | 0x1D | `CHIP_ERROR_EMPTY` |
| 30 | 0x1E | `CHIP_ERROR_INVALID_STRING_LENGTH` |
| 31 | 0x1F | `CHIP_ERROR_INVALID_LIST_LENGTH` |
| 33 | 0x21 | `CHIP_ERROR_END_OF_TLV` |
Expand Down Expand Up @@ -256,4 +256,3 @@ This file was **AUTOMATICALLY** generated by
| 1482 | 0x5CA | `FAILSAFE_REQUIRED` |
| 1483 | 0x5CB | `INVALID_IN_STATE` |
| 1520 | 0x5F0 | `WRITE_IGNORED` |

2 changes: 1 addition & 1 deletion examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ CHIP_ERROR AppTask::Init()
if (rc != 0)
{
P6_LOG("boot_set_confirmed failed");
appError(CHIP_ERROR_WELL_UNINITIALIZED);
appError(CHIP_ERROR_UNINITIALIZED);
}
#endif
// Register the callback to init the MDNS server when connectivity is available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ CHIP_ERROR AppTask::Init()
if (rc != 0)
{
P6_LOG("boot_set_confirmed failed");
appError(CHIP_ERROR_WELL_UNINITIALIZED);
appError(CHIP_ERROR_UNINITIALIZED);
}
#endif
// Register the callback to init the MDNS server when connectivity is available
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ CHIP_ERROR AppTask::Init()
if (rc != 0)
{
P6_LOG("boot_set_confirmed failed");
appError(CHIP_ERROR_WELL_UNINITIALIZED);
appError(CHIP_ERROR_UNINITIALIZED);
}
#endif
// Register the callback to init the MDNS server when connectivity is available
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void AppTask::Init()
if (rc != 0)
{
P6_LOG("boot_set_confirmed failed");
appError(CHIP_ERROR_WELL_UNINITIALIZED);
appError(CHIP_ERROR_UNINITIALIZED);
}
#endif
// Initialise WSTK buttons PB0 and PB1 (including debounce).
Expand Down
12 changes: 6 additions & 6 deletions examples/platform/linux/LinuxCommissionableDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CHIP_ERROR LinuxCommissionableDataProvider::Init(chip::Optional<std::vector<uint
chip::Optional<std::vector<uint8_t>> spake2pSalt, uint32_t spake2pIterationCount,
chip::Optional<uint32_t> setupPasscode, uint16_t discriminator)
{
VerifyOrReturnError(mIsInitialized == false, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == false, CHIP_ERROR_UNINITIALIZED);

if (discriminator > chip::kMaxDiscriminatorValue)
{
Expand Down Expand Up @@ -174,21 +174,21 @@ CHIP_ERROR LinuxCommissionableDataProvider::Init(chip::Optional<std::vector<uint

CHIP_ERROR LinuxCommissionableDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator)
{
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_UNINITIALIZED);
setupDiscriminator = mDiscriminator;
return CHIP_NO_ERROR;
}

CHIP_ERROR LinuxCommissionableDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount)
{
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_UNINITIALIZED);
iterationCount = mPaseIterationCount;
return CHIP_NO_ERROR;
}

CHIP_ERROR LinuxCommissionableDataProvider::GetSpake2pSalt(chip::MutableByteSpan & saltBuf)
{
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_UNINITIALIZED);

VerifyOrReturnError(saltBuf.size() >= kSpake2p_Max_PBKDF_Salt_Length, CHIP_ERROR_BUFFER_TOO_SMALL);
memcpy(saltBuf.data(), mPaseSalt.data(), mPaseSalt.size());
Expand All @@ -199,7 +199,7 @@ CHIP_ERROR LinuxCommissionableDataProvider::GetSpake2pSalt(chip::MutableByteSpan

CHIP_ERROR LinuxCommissionableDataProvider::GetSpake2pVerifier(chip::MutableByteSpan & verifierBuf, size_t & outVerifierLen)
{
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_UNINITIALIZED);

// By now, serialized verifier from Init should be correct size
VerifyOrReturnError(mSerializedPaseVerifier.size() == kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INTERNAL);
Expand All @@ -214,7 +214,7 @@ CHIP_ERROR LinuxCommissionableDataProvider::GetSpake2pVerifier(chip::MutableByte

CHIP_ERROR LinuxCommissionableDataProvider::GetSetupPasscode(uint32_t & setupPasscode)
{
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized == true, CHIP_ERROR_UNINITIALIZED);

// Pretend not implemented if we don't have a passcode value externally set
if (!mSetupPasscode.HasValue())
Expand Down
2 changes: 1 addition & 1 deletion src/controller/ExampleOperationalCredentialsIssuer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan
const ByteSpan & PAI,
Callback::Callback<OnNOCChainGeneration> * onCompletion)
{
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mInitialized, CHIP_ERROR_UNINITIALIZED);
// At this point, Credential issuer may wish to validate the CSR information
(void) attestationChallenge;
(void) csrNonce;
Expand Down
2 changes: 1 addition & 1 deletion src/credentials/DeviceAttestationVendorReserved.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class DeviceAttestationVendorReservedDeconstructor
*/
CHIP_ERROR GetNextVendorReservedElement(struct VendorReservedElement & element)
{
VerifyOrReturnError(mIsInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mIsInitialized, CHIP_ERROR_UNINITIALIZED);
if (mIsDone)
{
return CHIP_END_OF_TLV;
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/CHIPCryptoPALOpenSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_len
ERR_clear_error();

static_assert(P256ECDSASignature::Capacity() >= kP256_ECDSA_Signature_Length_Raw, "P256ECDSASignature must be large enough");
VerifyOrExit(mInitialized, error = CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrExit(mInitialized, error = CHIP_ERROR_UNINITIALIZED);
nid = _nidForCurve(MapECName(mPublicKey.Type()));
VerifyOrExit(nid != NID_undef, error = CHIP_ERROR_INVALID_ARGUMENT);

Expand Down Expand Up @@ -917,7 +917,7 @@ CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_k
EC_KEY * ec_key = EC_KEY_dup(to_const_EC_KEY(&mKeypair));
VerifyOrExit(ec_key != nullptr, error = CHIP_ERROR_INTERNAL);

VerifyOrExit(mInitialized, error = CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrExit(mInitialized, error = CHIP_ERROR_UNINITIALIZED);

local_key = EVP_PKEY_new();
VerifyOrExit(local_key != nullptr, error = CHIP_ERROR_INTERNAL);
Expand Down Expand Up @@ -1197,7 +1197,7 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t &
X509_NAME * subject = X509_NAME_new();
VerifyOrExit(subject != nullptr, error = CHIP_ERROR_INTERNAL);

VerifyOrExit(mInitialized, error = CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrExit(mInitialized, error = CHIP_ERROR_UNINITIALIZED);

result = X509_REQ_set_version(x509_req, 0);
VerifyOrExit(result == 1, error = CHIP_ERROR_INTERNAL);
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/CHIPCryptoPALPSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ static int CryptoRNG(void * ctxt, uint8_t * out_buffer, size_t out_length)

CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_length, P256ECDSASignature & out_signature) const
{
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mInitialized, CHIP_ERROR_UNINITIALIZED);
VerifyOrReturnError(isBufferNonEmpty(msg, msg_length), CHIP_ERROR_INVALID_ARGUMENT);

CHIP_ERROR error = CHIP_NO_ERROR;
Expand Down Expand Up @@ -558,7 +558,7 @@ CHIP_ERROR P256PublicKey::ECDSA_validate_hash_signature(const uint8_t * hash, co

CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_key, P256ECDHDerivedSecret & out_secret) const
{
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mInitialized, CHIP_ERROR_UNINITIALIZED);

CHIP_ERROR error = CHIP_NO_ERROR;
psa_status_t status = PSA_SUCCESS;
Expand Down Expand Up @@ -728,7 +728,7 @@ P256Keypair::~P256Keypair()
CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const
{
VerifyOrReturnError(isBufferNonEmpty(out_csr, csr_length), CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mInitialized, CHIP_ERROR_UNINITIALIZED);

MutableByteSpan csr(out_csr, csr_length);
ReturnErrorOnFailure(GenerateCertificateSigningRequest(this, csr));
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/CHIPCryptoPALmbedTLS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static inline const mbedtls_ecp_keypair * to_const_keypair(const P256KeypairCont

CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, const size_t msg_length, P256ECDSASignature & out_signature) const
{
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(mInitialized, CHIP_ERROR_UNINITIALIZED);
VerifyOrReturnError((msg != nullptr) && (msg_length > 0), CHIP_ERROR_INVALID_ARGUMENT);

uint8_t digest[kSHA256_Hash_Length];
Expand Down Expand Up @@ -593,7 +593,7 @@ CHIP_ERROR P256Keypair::ECDH_derive_secret(const P256PublicKey & remote_public_k

const mbedtls_ecp_keypair * keypair = to_const_keypair(&mKeypair);

VerifyOrExit(mInitialized, error = CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrExit(mInitialized, error = CHIP_ERROR_UNINITIALIZED);

result = mbedtls_ecp_group_load(&ecp_grp, MapECPGroupId(remote_public_key.Type()));
VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL);
Expand Down Expand Up @@ -787,7 +787,7 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t &
pk.CHIP_CRYPTO_PAL_PRIVATE(pk_ctx) = to_keypair(&mKeypair);
VerifyOrExit(pk.CHIP_CRYPTO_PAL_PRIVATE(pk_info) != nullptr, error = CHIP_ERROR_INTERNAL);

VerifyOrExit(mInitialized, error = CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrExit(mInitialized, error = CHIP_ERROR_UNINITIALIZED);

mbedtls_x509write_csr_set_key(&csr, &pk);

Expand Down
10 changes: 5 additions & 5 deletions src/include/platform/KeyValueStoreManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class KeyValueStoreManager
* CHIP_ERROR_BUFFER_TOO_SMALL the buffer could not fit the entire
* value, but as many bytes as possible
* were written to it
* CHIP_ERROR_WELL_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_INVALID_ARGUMENT key is empty or too long or value is
* too large
*/
Expand All @@ -93,7 +93,7 @@ class KeyValueStoreManager
* CHIP_ERROR_BUFFER_TOO_SMALL the buffer could not fit the entire
* value, but as many bytes as possible
* were written to it
* CHIP_ERROR_WELL_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_INVALID_ARGUMENT key is empty or too long or value is
* too large
*/
Expand All @@ -120,7 +120,7 @@ class KeyValueStoreManager
* CHIP_ERROR_INTEGRITY_CHECK_FAILED checksum validation failed after
* writing the data
* CHIP_ERROR_PERSISTED_STORAGE_FAILED failed to write the value.
* CHIP_ERROR_WELL_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_INVALID_ARGUMENT key is empty or too long or value is
* too large
*/
Expand All @@ -139,7 +139,7 @@ class KeyValueStoreManager
* CHIP_ERROR_INTEGRITY_CHECK_FAILED checksum validation failed after
* writing the data
* CHIP_ERROR_PERSISTED_STORAGE_FAILED failed to write the value.
* CHIP_ERROR_WELL_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_INVALID_ARGUMENT key is empty or too long or value is
* too large
*/
Expand All @@ -165,7 +165,7 @@ class KeyValueStoreManager
* CHIP_ERROR_INTEGRITY_CHECK_FAILED checksum validation failed after
* erasing data
* CHIP_ERROR_PERSISTED_STORAGE_FAILED failed to erase the value.
* CHIP_ERROR_WELL_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_UNINITIALIZED the KVS is not initialized
* CHIP_ERROR_INVALID_ARGUMENT key is empty or too long
*/
CHIP_ERROR Delete(const char * key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ template <class ImplClass>
CHIP_ERROR GenericPlatformManagerImpl_Zephyr<ImplClass>::_StartEventLoopTask(void)
{
if (!mChipThreadStack)
return CHIP_ERROR_WELL_UNINITIALIZED;
return CHIP_ERROR_UNINITIALIZED;

const auto tid = k_thread_create(&mChipThread, mChipThreadStack, CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE, EventLoopTaskMain,
this, nullptr, nullptr, CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY, 0, K_NO_WAIT);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/address_resolve/AddressResolve.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class Resolver
/// This method will return CHIP_ERROR_INCORRECT_STATE if the handle is
/// still active.
///
/// This method will return CHIP_ERROR_WELL_EMPTY if there are no more
/// This method will return CHIP_ERROR_EMPTY if there are no more
/// results.
///
/// This method may return other errors in some cases.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/address_resolve/AddressResolve_DefaultImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ CHIP_ERROR Resolver::LookupNode(const NodeLookupRequest & request, Impl::NodeLoo
CHIP_ERROR Resolver::TryNextResult(Impl::NodeLookupHandle & handle)
{
VerifyOrReturnError(!mActiveLookups.Contains(&handle), CHIP_ERROR_INCORRECT_STATE);
VerifyOrReturnError(handle.HasLookupResult(), CHIP_ERROR_WELL_EMPTY);
VerifyOrReturnError(handle.HasLookupResult(), CHIP_ERROR_EMPTY);

auto listener = handle.GetListener();
auto peerId = handle.GetRequest().GetPeerId();
Expand Down
10 changes: 5 additions & 5 deletions src/lib/core/CHIPError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err)
case CHIP_ERROR_WRONG_KEY_TYPE.AsInteger():
desc = "Wrong key type";
break;
case CHIP_ERROR_WELL_UNINITIALIZED.AsInteger():
desc = "Well uninitialized";
case CHIP_ERROR_UNINITIALIZED.AsInteger():
desc = "Uninitialized";
break;
case CHIP_ERROR_WELL_EMPTY.AsInteger():
desc = "Well empty";
case CHIP_ERROR_EMPTY.AsInteger():
desc = "Empty";
break;
case CHIP_ERROR_INVALID_STRING_LENGTH.AsInteger():
desc = "Invalid string length";
break;
case CHIP_ERROR_INVALID_LIST_LENGTH.AsInteger():
desc = "invalid list length";
desc = "Invalid list length";
break;
case CHIP_END_OF_TLV.AsInteger():
desc = "End of TLV";
Expand Down
8 changes: 4 additions & 4 deletions src/lib/core/CHIPError.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,22 +666,22 @@ using CHIP_ERROR = ::chip::ChipError;
#define CHIP_ERROR_WRONG_KEY_TYPE CHIP_CORE_ERROR(0x1b)

/**
* @def CHIP_ERROR_WELL_UNINITIALIZED
* @def CHIP_ERROR_UNINITIALIZED
*
* @brief
* A requested object is uninitialized.
*
*/
#define CHIP_ERROR_WELL_UNINITIALIZED CHIP_CORE_ERROR(0x1c)
#define CHIP_ERROR_UNINITIALIZED CHIP_CORE_ERROR(0x1c)

/**
* @def CHIP_ERROR_WELL_EMPTY
* @def CHIP_ERROR_EMPTY
*
* @brief
* A requested object is empty.
*
*/
#define CHIP_ERROR_WELL_EMPTY CHIP_CORE_ERROR(0x1d)
#define CHIP_ERROR_EMPTY CHIP_CORE_ERROR(0x1d)

/**
* @def CHIP_ERROR_INVALID_STRING_LENGTH
Expand Down
4 changes: 2 additions & 2 deletions src/lib/core/tests/TestCHIPErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static const CHIP_ERROR kTestElements[] =
CHIP_ERROR_BUFFER_TOO_SMALL,
CHIP_ERROR_DUPLICATE_KEY_ID,
CHIP_ERROR_WRONG_KEY_TYPE,
CHIP_ERROR_WELL_UNINITIALIZED,
CHIP_ERROR_WELL_EMPTY,
CHIP_ERROR_UNINITIALIZED,
CHIP_ERROR_EMPTY,
CHIP_ERROR_INVALID_STRING_LENGTH,
CHIP_ERROR_INVALID_LIST_LENGTH,
CHIP_END_OF_TLV,
Expand Down
12 changes: 6 additions & 6 deletions src/lib/dnssd/Discovery_ImplPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ CHIP_ERROR CopyTextRecordValue(char * buffer, size_t bufferLen, CommissioningMod
template <class T>
CHIP_ERROR CopyTextRecordValue(char * buffer, size_t bufferLen, chip::Optional<T> value)
{
VerifyOrReturnError(value.HasValue(), CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(value.HasValue(), CHIP_ERROR_UNINITIALIZED);
return CopyTextRecordValue(buffer, bufferLen, value.Value());
}

CHIP_ERROR CopyTextRecordValue(char * buffer, size_t bufferLen, chip::Optional<uint16_t> value1, chip::Optional<uint16_t> value2)
{
VerifyOrReturnError(value1.HasValue(), CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(value1.HasValue(), CHIP_ERROR_UNINITIALIZED);
return value2.HasValue() ? CopyTextRecordValue(buffer, bufferLen, value1.Value(), value2.Value())
: CopyTextRecordValue(buffer, bufferLen, value1.Value());
}
Expand All @@ -180,7 +180,7 @@ CHIP_ERROR CopyTextRecordValue(char * buffer, size_t bufferLen, const chip::Opti
VerifyOrReturnError((key == TxtFieldKey::kSessionIdleInterval || key == TxtFieldKey::kSessionActiveInterval ||
key == TxtFieldKey::kSessionActiveThreshold),
CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(optional.HasValue(), CHIP_ERROR_WELL_UNINITIALIZED);
VerifyOrReturnError(optional.HasValue(), CHIP_ERROR_UNINITIALIZED);

CHIP_ERROR err;
if (key == TxtFieldKey::kSessionActiveThreshold)
Expand Down Expand Up @@ -215,9 +215,9 @@ CHIP_ERROR CopyTxtRecord(TxtFieldKey key, char * buffer, size_t bufferLen, const
// A ICD operating as a LIT should not advertise its slow polling interval
if (params.GetICDOperatingAsLIT().HasValue() && params.GetICDOperatingAsLIT().Value())
{
// returning WELL_UNINITIALIZED ensures that the SII string isn't added by the AddTxtRecord
// Returning UNINITIALIZED ensures that the SII string isn't added by the AddTxtRecord
// without erroring out the action.
return CHIP_ERROR_WELL_UNINITIALIZED;
return CHIP_ERROR_UNINITIALIZED;
}
FALLTHROUGH;
#endif
Expand Down Expand Up @@ -261,7 +261,7 @@ CHIP_ERROR AddTxtRecord(TxtFieldKey key, TextEntry * entries, size_t & entriesCo
const T & params)
{
CHIP_ERROR error = CopyTxtRecord(key, buffer, bufferLen, params);
VerifyOrReturnError(CHIP_ERROR_WELL_UNINITIALIZED != error, CHIP_NO_ERROR);
VerifyOrReturnError(CHIP_ERROR_UNINITIALIZED != error, CHIP_NO_ERROR);
VerifyOrReturnError(CHIP_NO_ERROR == error, error);

entries[entriesCount++] = { Internal::txtFieldInfo[static_cast<int>(key)].keyStr, reinterpret_cast<const uint8_t *>(buffer),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/commands/Dns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class DnsShellResolverDelegate : public Dnssd::CommissioningResolveDelegate, pub
// Schedule a retry. Not called directly so we do not recurse in OnNodeAddressResolved
DeviceLayer::SystemLayer().ScheduleLambda([this] {
CHIP_ERROR err = AddressResolve::Resolver::Instance().TryNextResult(Handle());
if (err != CHIP_NO_ERROR && err != CHIP_ERROR_WELL_EMPTY)
if (err != CHIP_NO_ERROR && err != CHIP_ERROR_EMPTY)
{
ChipLogError(Discovery, "Failed to list next result: %" CHIP_ERROR_FORMAT, err.Format());
}
Expand Down
Loading

0 comments on commit 805b4ab

Please sign in to comment.