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, 3 insertions, 5 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 57f0f9b..346e887 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -285,17 +285,15 @@ void ChromotingHost::OnIncomingSession(
return;
}
- scoped_ptr<protocol::SessionConfig> config =
- protocol::SessionConfig::SelectCommon(session->candidate_config(),
- protocol_config_.get());
- if (!config) {
+ protocol::SessionConfig config;
+ if (!protocol_config_->Select(session->candidate_config(), &config)) {
LOG(WARNING) << "Rejecting connection from " << session->jid()
<< " because no compatible configuration has been found.";
*response = protocol::SessionManager::INCOMPATIBLE;
return;
}
- session->set_config(config.Pass());
+ session->set_config(config);
*response = protocol::SessionManager::ACCEPT;