Skip to content

Commit

Permalink
adding more logging for detecting pending state clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Jun 5, 2024
1 parent 20e4658 commit b8af160
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openmls/src/group/mls_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,16 +283,23 @@ impl MlsGroup {
&mut self,
storage: &Storage,
) -> Result<(), Storage::Error> {
println!("___________CAMERON______________: clearing pending commit");
match self.group_state {
MlsGroupState::PendingCommit(ref pending_commit_state) => {
println!("___________CAMERON______________: clearing pending commit - matched group state is pending commit");
if let PendingCommitState::Member(_) = **pending_commit_state {
println!("___________CAMERON______________: clearing pending commit - pending commit state is member");
self.group_state = MlsGroupState::Operational;
storage.write_group_state(self.group_id(), &self.group_state)
} else {
println!("___________CAMERON______________: clearing pending commit - WONT CLEAR! - pending commit state is external");
Ok(())
}
}
MlsGroupState::Operational | MlsGroupState::Inactive => Ok(()),
MlsGroupState::Operational | MlsGroupState::Inactive => {
println!("___________CAMERON______________: clearing pending commit - matched group state is operational or inactive");
Ok(())
}
}
}

Expand Down

0 comments on commit b8af160

Please sign in to comment.