From 973a5ca659848118f6aae9148a77b1a58e303492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 17 Jun 2017 01:23:38 +0100 Subject: [PATCH] Force channel binding to None --- src/tcp.rs | 10 +++++----- src/xmpp_stream.rs | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tcp.rs b/src/tcp.rs index 4510a39..2f207ec 100644 --- a/src/tcp.rs +++ b/src/tcp.rs @@ -51,10 +51,10 @@ impl Future for TcpClient { }; self.state = new_state; - match result { - // by polling again, we register new future - Ok(Async::NotReady) => self.poll(), - result => result - } + match result { + // by polling again, we register new future + Ok(Async::NotReady) => self.poll(), + result => result + } } } diff --git a/src/xmpp_stream.rs b/src/xmpp_stream.rs index 2b8f098..c84777f 100644 --- a/src/xmpp_stream.rs +++ b/src/xmpp_stream.rs @@ -4,7 +4,7 @@ use futures::*; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::codec::Framed; use xml; -use sasl::common::Credentials; +use sasl::common::{Credentials, ChannelBinding}; use jid::Jid; use xmpp_codec::*; @@ -55,7 +55,8 @@ impl XMPPStream { pub fn auth(self, username: String, password: String) -> Result, String> { let creds = Credentials::default() .with_username(username) - .with_password(password); + .with_password(password) + .with_channel_binding(ChannelBinding::None); ClientAuth::new(self, creds) } }