Loading floss/hcidoc/src/groups/connections.rs +12 −0 Original line number Diff line number Diff line Loading @@ -612,6 +612,14 @@ impl OddDisconnectionsRule { self.last_feat_handle.clear(); self.pending_disconnect_due_to_host_power_off.clear(); } fn process_system_note(&mut self, note: &String) { // Carryover section doesn't contain the NOCP from the controller. // The note may contain zero bytes, so don't check for exact string. if note.contains("END OF CARRYOVER SECTION") { self.nocp_by_handle.clear(); } } } impl Rule for OddDisconnectionsRule { Loading Loading @@ -806,6 +814,10 @@ impl Rule for OddDisconnectionsRule { // We don't do anything with RX packets yet. PacketChild::AclRx(_) => (), PacketChild::SystemNote(note) => { self.process_system_note(note); } // End packet.inner match _ => (), } Loading floss/hcidoc/src/parser.rs +6 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,7 @@ pub enum PacketChild { AclTx(Acl), AclRx(Acl), NewIndex(NewIndex), SystemNote(String), } impl<'a> TryFrom<&'a LinuxSnoopPacket> for PacketChild { Loading Loading @@ -320,6 +321,11 @@ impl<'a> TryFrom<&'a LinuxSnoopPacket> for PacketChild { Err(e) => Err(format!("Couldn't parse new index: {:?}", e)), }, LinuxSnoopOpcodes::SystemNote => match String::from_utf8(item.data.to_vec()) { Ok(data) => Ok(PacketChild::SystemNote(data)), Err(e) => Err(format!("Couldn't parse system note: {:?}", e)), }, // TODO(b/262928525) - Add packet handlers for more packet types. _ => Err(format!("Unhandled packet opcode: {:?}", item.opcode())), } Loading Loading
floss/hcidoc/src/groups/connections.rs +12 −0 Original line number Diff line number Diff line Loading @@ -612,6 +612,14 @@ impl OddDisconnectionsRule { self.last_feat_handle.clear(); self.pending_disconnect_due_to_host_power_off.clear(); } fn process_system_note(&mut self, note: &String) { // Carryover section doesn't contain the NOCP from the controller. // The note may contain zero bytes, so don't check for exact string. if note.contains("END OF CARRYOVER SECTION") { self.nocp_by_handle.clear(); } } } impl Rule for OddDisconnectionsRule { Loading Loading @@ -806,6 +814,10 @@ impl Rule for OddDisconnectionsRule { // We don't do anything with RX packets yet. PacketChild::AclRx(_) => (), PacketChild::SystemNote(note) => { self.process_system_note(note); } // End packet.inner match _ => (), } Loading
floss/hcidoc/src/parser.rs +6 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,7 @@ pub enum PacketChild { AclTx(Acl), AclRx(Acl), NewIndex(NewIndex), SystemNote(String), } impl<'a> TryFrom<&'a LinuxSnoopPacket> for PacketChild { Loading Loading @@ -320,6 +321,11 @@ impl<'a> TryFrom<&'a LinuxSnoopPacket> for PacketChild { Err(e) => Err(format!("Couldn't parse new index: {:?}", e)), }, LinuxSnoopOpcodes::SystemNote => match String::from_utf8(item.data.to_vec()) { Ok(data) => Ok(PacketChild::SystemNote(data)), Err(e) => Err(format!("Couldn't parse system note: {:?}", e)), }, // TODO(b/262928525) - Add packet handlers for more packet types. _ => Err(format!("Unhandled packet opcode: {:?}", item.opcode())), } Loading