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();
|
.collect();
|
||||||
|
debug!("<< {}", String::from(root));
|
||||||
return Ok(Some(Packet::StreamStart(attrs)));
|
return Ok(Some(Packet::StreamStart(attrs)));
|
||||||
} else if self.stanza_builder.depth() == 1 {
|
} else if self.stanza_builder.depth() == 1 {
|
||||||
self.driver.release_temporaries();
|
self.driver.release_temporaries();
|
||||||
|
|
||||||
if let Some(stanza) = self.stanza_builder.unshift_child() {
|
if let Some(stanza) = self.stanza_builder.unshift_child() {
|
||||||
|
debug!("<< {}", String::from(&stanza));
|
||||||
return Ok(Some(Packet::Stanza(stanza)));
|
return Ok(Some(Packet::Stanza(stanza)));
|
||||||
}
|
}
|
||||||
} else if let Some(_) = self.stanza_builder.root.take() {
|
} else if let Some(_) = self.stanza_builder.root.take() {
|
||||||
self.driver.release_temporaries();
|
self.driver.release_temporaries();
|
||||||
|
|
||||||
|
debug!("<< </stream:stream>");
|
||||||
return Ok(Some(Packet::StreamEnd));
|
return Ok(Some(Packet::StreamEnd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue