mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
tokio-xmpp: Add debug prints for incoming packets
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e8a7d909c1
commit
5256575512
1 changed files with 3 additions and 0 deletions
|
@ -88,16 +88,19 @@ impl Decoder for XMPPCodec {
|
|||
},
|
||||
))
|
||||
.collect();
|
||||
debug!("<< {}", String::from(root));
|
||||
return Ok(Some(Packet::StreamStart(attrs)));
|
||||
} else if self.stanza_builder.depth() == 1 {
|
||||
self.driver.release_temporaries();
|
||||
|
||||
if let Some(stanza) = self.stanza_builder.unshift_child() {
|
||||
debug!("<< {}", String::from(&stanza));
|
||||
return Ok(Some(Packet::Stanza(stanza)));
|
||||
}
|
||||
} else if let Some(_) = self.stanza_builder.root.take() {
|
||||
self.driver.release_temporaries();
|
||||
|
||||
debug!("<< </stream:stream>");
|
||||
return Ok(Some(Packet::StreamEnd));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue