Skip to content

Commit

Permalink
Fixed bugs in announce message sending.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidv1992 committed Mar 13, 2024
1 parent 1641959 commit b77707b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion statime/src/datastructures/messages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ impl<'a> Message<'a> {
}

impl Message<'_> {
#[allow(unused)]
pub(crate) fn verify_signed(&self, provider: &impl SecurityAssociationProvider) -> bool {
log::trace!("Validation message");
let mut tlv_offset = 0;
Expand Down
23 changes: 10 additions & 13 deletions statime/src/port/state/master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,16 @@ impl MasterState {
}
}

let packet_length =
match Message::announce(global, port_identity, self.announce_seq_ids.generate())
.serialize(buffer)
{
Ok(length) => length,
Err(error) => {
log::error!(
"Statime bug: Could not serialize announce message {:?}",
error
);
return actions![];
}
};
let packet_length = match message.serialize(buffer) {
Ok(length) => length,
Err(error) => {
log::error!(
"Statime bug: Could not serialize announce message {:?}",
error
);
return actions![];
}
};

actions![
PortAction::ResetAnnounceTimer {
Expand Down

0 comments on commit b77707b

Please sign in to comment.