parent
f7b02c210d
commit
63afd5d939
2 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ tokio-tls = "0.2"
|
||||||
sasl = "0.4"
|
sasl = "0.4"
|
||||||
trust-dns-resolver = "0.10"
|
trust-dns-resolver = "0.10"
|
||||||
trust-dns-proto = "0.6"
|
trust-dns-proto = "0.6"
|
||||||
xmpp-parsers = "0.12.2"
|
xmpp-parsers = "0.13"
|
||||||
idna = "0.1"
|
idna = "0.1"
|
||||||
quick-xml = "0.13"
|
quick-xml = "0.13"
|
||||||
derive-error = "0.0.4"
|
derive-error = "0.0.4"
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ impl<S: AsyncWrite> ClientBind<S> {
|
||||||
}
|
}
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
let resource = stream.jid.resource.clone();
|
let resource = stream.jid.resource.clone();
|
||||||
let iq = Iq::from_set(Bind::new(resource)).with_id(BIND_REQ_ID.to_string());
|
let iq = Iq::from_set(BIND_REQ_ID, Bind::new(resource));
|
||||||
let send = stream.send_stanza(iq);
|
let send = stream.send_stanza(iq);
|
||||||
ClientBind::WaitSend(send)
|
ClientBind::WaitSend(send)
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +64,7 @@ impl<S: AsyncRead + AsyncWrite> Future for ClientBind<S> {
|
||||||
ClientBind::WaitRecv(mut stream) => match stream.poll() {
|
ClientBind::WaitRecv(mut stream) => match stream.poll() {
|
||||||
Ok(Async::Ready(Some(Packet::Stanza(stanza)))) => match Iq::try_from(stanza) {
|
Ok(Async::Ready(Some(Packet::Stanza(stanza)))) => match Iq::try_from(stanza) {
|
||||||
Ok(iq) => {
|
Ok(iq) => {
|
||||||
if iq.id == Some(BIND_REQ_ID.to_string()) {
|
if iq.id == BIND_REQ_ID {
|
||||||
match iq.payload {
|
match iq.payload {
|
||||||
IqType::Result(payload) => {
|
IqType::Result(payload) => {
|
||||||
payload
|
payload
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue