Index: remoting/host/chromoting_host.cc |
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc |
index 57f0f9b62302d051cb71997d20706c63ec3fcf3a..346e887fc46c48feeb636215fd889f0b6af92057 100644 |
--- a/remoting/host/chromoting_host.cc |
+++ b/remoting/host/chromoting_host.cc |
@@ -285,17 +285,15 @@ |
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; |