[Spice-devel] [spice-gtk v1 2/2] channel-webdav: do not handle vmc_data message twice

Victor Toso victortoso at redhat.com
Mon May 6 10:31:56 UTC 2019


From: Victor Toso <me at victortoso.com>

This is a regression from commit aae07fb in 2017-03-27 by Victor Toso
<me at victortoso.com>. The message is handled by channel-webdav and
should not be exposed nor handled elsewhere.

Found this while inspecting the code, there is not real side effect
as no one trying to handle port-data from webdav's channel-port.

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/channel-webdav.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/channel-webdav.c b/src/channel-webdav.c
index 195ae34..b5af5a9 100644
--- a/src/channel-webdav.c
+++ b/src/channel-webdav.c
@@ -607,8 +607,10 @@ static void spice_webdav_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
 
     parent_class = SPICE_CHANNEL_CLASS(spice_webdav_channel_parent_class);
 
-    if (type == SPICE_MSG_SPICEVMC_DATA)
+    if (type == SPICE_MSG_SPICEVMC_DATA) {
         webdav_handle_data_msg(channel, msg);
+        return;
+    }
 
     /* The only message that we need to handle ourselves is SPICE_MSG_SPICEVMC_DATA
      * as we want to read it with spice_vmc_input/output_stream to handle
-- 
2.20.1



More information about the Spice-devel mailing list