summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r--remoting/host/chromoting_host.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 346e887..57f0f9b 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -285,15 +285,17 @@ void ChromotingHost::OnIncomingSession(
return;
}
- protocol::SessionConfig config;
- if (!protocol_config_->Select(session->candidate_config(), &config)) {
+ scoped_ptr<protocol::SessionConfig> config =
+ protocol::SessionConfig::SelectCommon(session->candidate_config(),
+ protocol_config_.get());
+ if (!config) {
LOG(WARNING) << "Rejecting connection from " << session->jid()
<< " because no compatible configuration has been found.";
*response = protocol::SessionManager::INCOMPATIBLE;
return;
}
- session->set_config(config);
+ session->set_config(config.Pass());
*response = protocol::SessionManager::ACCEPT;