Skip to content

Commit 29622cc

Browse files
committed
GenComm: A new error code is introduced by BusyWithOtherAdmin in the spec
1 parent d518be9 commit 29622cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

matter/src/data_model/sdm/general_commissioning.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ enum CommissioningError {
3333
ErrValueOutsideRange = 1,
3434
ErrInvalidAuth = 2,
3535
ErrNotCommissioning = 3,
36+
ErrBusyWithOtherAdmin = 4,
3637
}
3738

3839
pub const ID: u32 = 0x0030;
@@ -180,17 +181,18 @@ impl GenCommCluster {
180181
cmd_enter!("ARM Fail Safe");
181182

182183
let p = FailSafeParams::from_tlv(&cmd_req.data)?;
184+
let mut status = CommissioningError::Ok as u8;
183185

184186
if self
185187
.failsafe
186188
.arm(p.expiry_len, cmd_req.trans.session.get_session_mode())
187189
.is_err()
188190
{
189-
return Err(IMStatusCode::Busy);
191+
status = CommissioningError::ErrBusyWithOtherAdmin as u8;
190192
}
191193

192194
let cmd_data = CommonResponse {
193-
error_code: CommissioningError::Ok as u8,
195+
error_code: status,
194196
debug_txt: "".to_owned(),
195197
};
196198
let resp = ib::InvResp::cmd_new(

0 commit comments

Comments
 (0)