Skip to content

Commit

Permalink
Use SOFTWARE_UDPATE_IGNORED error iso UNSUPPORTED_EXCHANGE_VERSION (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tima-q authored and pull[bot] committed Jan 15, 2024
1 parent c66946e commit 1295760
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion docs/ERROR_CODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ This file was **AUTOMATICALLY** generated by
| 2 | 0x02 | `CHIP_ERROR_CONNECTION_ABORTED` |
| 3 | 0x03 | `CHIP_ERROR_INCORRECT_STATE` |
| 4 | 0x04 | `CHIP_ERROR_MESSAGE_TOO_LONG` |
| 5 | 0x05 | `CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION` |
| 6 | 0x06 | `CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS` |
| 7 | 0x07 | `CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER` |
| 8 | 0x08 | `CHIP_ERROR_NO_CONNECTION_HANDLER` |
Expand Down
3 changes: 0 additions & 3 deletions src/lib/core/CHIPError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err)
case CHIP_ERROR_MESSAGE_TOO_LONG.AsInteger():
desc = "Message too long";
break;
case CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION.AsInteger():
desc = "Unsupported exchange version";
break;
case CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS.AsInteger():
desc = "Too many unsolicited message handlers";
break;
Expand Down
9 changes: 1 addition & 8 deletions src/lib/core/CHIPError.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,14 +466,7 @@ using CHIP_ERROR = ::chip::ChipError;
*/
#define CHIP_ERROR_MESSAGE_TOO_LONG CHIP_CORE_ERROR(0x04)

/**
* @def CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION
*
* @brief
* An exchange version is not supported.
*
*/
#define CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION CHIP_CORE_ERROR(0x05)
// AVAILABLE: 0x05

/**
* @def CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
Expand Down
1 change: 0 additions & 1 deletion src/lib/core/tests/TestCHIPErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ static const CHIP_ERROR kTestElements[] =
CHIP_ERROR_CONNECTION_ABORTED,
CHIP_ERROR_INCORRECT_STATE,
CHIP_ERROR_MESSAGE_TOO_LONG,
CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION,
CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS,
CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER,
CHIP_ERROR_NO_CONNECTION_HANDLER,
Expand Down
3 changes: 2 additions & 1 deletion src/platform/qpg/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block)

if (true != qvCHIP_OtaValidateImage(qvCHIP_OtaImgHeader))
{
return CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION;
// Dropping image due to invalid header
return CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED;
}
}

Expand Down

0 comments on commit 1295760

Please sign in to comment.