Skip to content

Commit

Permalink
return SPDM_STATUS_INVALID_STATE_PEER to caller when resync
Browse files Browse the repository at this point in the history
fix #98

Signed-off-by: Yang, Longlong <[email protected]>
  • Loading branch information
longlongyang committed Jun 18, 2024
1 parent 59aa578 commit fa67efd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spdmlib/src/requester/handle_error_response_req.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use codec::{Codec, Reader};
use crate::common::session::SpdmSessionState;
use crate::error::{
SpdmResult, SPDM_STATUS_BUSY_PEER, SPDM_STATUS_ERROR_PEER, SPDM_STATUS_INVALID_MSG_FIELD,
SPDM_STATUS_INVALID_PARAMETER, SPDM_STATUS_NOT_READY_PEER, SPDM_STATUS_SESSION_MSG_ERROR,
SPDM_STATUS_INVALID_PARAMETER, SPDM_STATUS_INVALID_STATE_PEER, SPDM_STATUS_NOT_READY_PEER,
SPDM_STATUS_SESSION_MSG_ERROR,
};
use crate::message::*;
use crate::requester::RequesterContext;
Expand All @@ -33,7 +34,7 @@ impl RequesterContext {
};
session.set_session_state(SpdmSessionState::SpdmSessionNotStarted);
}
Err(SPDM_STATUS_INVALID_PARAMETER)
Err(SPDM_STATUS_INVALID_STATE_PEER)
} else {
Err(SPDM_STATUS_ERROR_PEER)
}
Expand Down

0 comments on commit fa67efd

Please sign in to comment.