summaryrefslogtreecommitdiffstats
path: root/client/red_client.cpp
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-22 16:36:42 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-22 17:34:45 +0200
commit72cf104c2897b4dd124c8a65df02e6895a9f1d88 (patch)
treea1f4c3db6621d16db6744fc84ee0a22736e5108b /client/red_client.cpp
parent652c13e71b8c203fc701edb6bad365c50e7cf1aa (diff)
downloadspice-72cf104c2897b4dd124c8a65df02e6895a9f1d88.tar.gz
spice-72cf104c2897b4dd124c8a65df02e6895a9f1d88.tar.xz
spice-72cf104c2897b4dd124c8a65df02e6895a9f1d88.zip
client: Support connecting to a major==1 server
Diffstat (limited to 'client/red_client.cpp')
-rw-r--r--client/red_client.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/red_client.cpp b/client/red_client.cpp
index f5b52d64..573e4b28 100644
--- a/client/red_client.cpp
+++ b/client/red_client.cpp
@@ -171,7 +171,9 @@ void Migrate::run()
DBG(0, "");
try {
conn_type = _client.get_connection_options(SPICE_CHANNEL_MAIN);
- RedPeer::ConnectionOptions con_opt(conn_type, _port, _sport, _auth_options, _con_ciphers);
+ RedPeer::ConnectionOptions con_opt(conn_type, _port, _sport,
+ _client.get_peer_major(),
+ _auth_options, _con_ciphers);
MigChannels::iterator iter = _channels.begin();
connection_id = _client.get_connection_id();
connect_one(**iter, con_opt, connection_id);
@@ -179,6 +181,7 @@ void Migrate::run()
for (++iter; iter != _channels.end(); ++iter) {
conn_type = _client.get_connection_options((*iter)->get_type());
con_opt = RedPeer::ConnectionOptions(conn_type, _port, _sport,
+ _client.get_peer_major(),
_auth_options, _con_ciphers);
connect_one(**iter, con_opt, connection_id);
}
@@ -211,7 +214,7 @@ void Migrate::start(const SpiceMsgMainMigrationBegin* migrate)
{
DBG(0, "");
abort();
- if ((SPICE_VERSION_MAJOR == 1) && (_client.get_peer_minor() < 2)) {
+ if ((_client.get_peer_major() == 1) && (_client.get_peer_minor() < 2)) {
LOG_INFO("server minor version incompatible for destination authentication"
"(missing dest pubkey in SpiceMsgMainMigrationBegin)");
OldRedMigrationBegin* old_migrate = (OldRedMigrationBegin*)migrate;
@@ -304,6 +307,7 @@ RedClient::RedClient(Application& application)
, _application (application)
, _port (-1)
, _sport (-1)
+ , _protocol (0)
, _connection_id (0)
, _mouse_mode (SPICE_MOUSE_MODE_SERVER)
, _notify_disconnect (false)