summaryrefslogtreecommitdiffstats
path: root/client/red_client.cpp
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-23 12:18:41 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-23 12:18:41 +0200
commiteb3fe11d944acf32d7795fb6d0d69c25ce800d54 (patch)
tree4a2596d6e4ed7edddb1600278a05a248aef68b02 /client/red_client.cpp
parentf35ac2049a84fd5edbea43f679dfcd3cd4173367 (diff)
downloadspice-eb3fe11d944acf32d7795fb6d0d69c25ce800d54.tar.gz
spice-eb3fe11d944acf32d7795fb6d0d69c25ce800d54.tar.xz
spice-eb3fe11d944acf32d7795fb6d0d69c25ce800d54.zip
Fix version mismatch error on connect
Protocol is 0 (auto), 1 (old), or 2 (new). This is (apart from 0) the same as the major number for the stable protocol. However, the current major is ~(-1) to signify it being unstable, so don't use the major number as source for setting or comparing protocol.
Diffstat (limited to 'client/red_client.cpp')
-rw-r--r--client/red_client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/red_client.cpp b/client/red_client.cpp
index 573e4b28..c2be58c3 100644
--- a/client/red_client.cpp
+++ b/client/red_client.cpp
@@ -172,7 +172,7 @@ void Migrate::run()
try {
conn_type = _client.get_connection_options(SPICE_CHANNEL_MAIN);
RedPeer::ConnectionOptions con_opt(conn_type, _port, _sport,
- _client.get_peer_major(),
+ _client.get_protocol(),
_auth_options, _con_ciphers);
MigChannels::iterator iter = _channels.begin();
connection_id = _client.get_connection_id();
@@ -181,7 +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(),
+ _client.get_protocol(),
_auth_options, _con_ciphers);
connect_one(**iter, con_opt, connection_id);
}