[Spice-commits] src/spice-channel.c subprojects/spice-common

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 28 10:14:03 UTC 2018


 src/spice-channel.c      |   17 ++---------------
 subprojects/spice-common |    2 +-
 2 files changed, 3 insertions(+), 16 deletions(-)

New commits:
commit f77a1d50aa45bf315739e2d0264f4e02f8e2bc9f
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Sep 25 09:43:23 2018 +0100

    proto: Remove support for SPICE version 1
    
    SPICE version 2 was introduced more than 8 years ago.
    RHEL 6 already removed support for version 1 in the server.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/src/spice-channel.c b/src/spice-channel.c
index 7de1298..2aa0826 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -1315,11 +1315,8 @@ static void spice_channel_send_link(SpiceChannel *channel)
     g_object_get(c->session, "protocol", &protocol, NULL);
     switch (protocol) {
     case 1: /* protocol 1 == major 1, old 0.4 protocol, last active minor */
-        c->link_hdr.major_version = 1;
-        c->link_hdr.minor_version = 3;
-        c->parser = spice_get_server_channel_parser1(c->channel_type, NULL);
-        c->marshallers = spice_message_marshallers_get1();
-        break;
+        g_critical("deprecated major %d", protocol);
+        return;
     case SPICE_VERSION_MAJOR: /* protocol 2 == current */
         c->link_hdr.major_version = SPICE_VERSION_MAJOR;
         c->link_hdr.minor_version = SPICE_VERSION_MINOR;
@@ -1410,16 +1407,6 @@ static gboolean spice_channel_recv_link_hdr(SpiceChannel *channel)
     return TRUE;
 
 error:
-    /* Windows socket seems to give early CONNRESET errors. The server
-       does not linger when closing the socket if the protocol is
-       incompatible. Try with the oldest protocol in this case: */
-    if (c->link_hdr.major_version != 1) {
-        SPICE_DEBUG("%s: error, switching to protocol 1 (spice 0.4)", c->name);
-        c->state = SPICE_CHANNEL_STATE_RECONNECTING;
-        g_object_set(c->session, "protocol", 1, NULL);
-        return FALSE;
-    }
-
     c->event = SPICE_CHANNEL_ERROR_LINK;
     return FALSE;
 }
diff --git a/subprojects/spice-common b/subprojects/spice-common
index bb15d48..7d16536 160000
--- a/subprojects/spice-common
+++ b/subprojects/spice-common
@@ -1 +1 @@
-Subproject commit bb15d4815ab586b4c4a20f4a565970a44824c42c
+Subproject commit 7d16536672a5f2a0f61c6b4279d45b509e957dfb


More information about the Spice-commits mailing list