[Spice-commits] src/channel-main.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 5 09:06:09 UTC 2020


 src/channel-main.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ee7f5908cff0cae246a220a29ac721e48cddcd14
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Fri Oct 2 13:09:41 2020 +0100

    channel-main: Add comment on handling GLib I/O error statuses
    
    Document a behaviour in the code asked a couple of times.
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>
    Acked-by: Marc-André Lureau <marcandre.lureau at redhat.com>

diff --git a/src/channel-main.c b/src/channel-main.c
index 5fefded..060b70c 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1947,6 +1947,9 @@ static void main_agent_handle_xfer_status(SpiceMainChannel *channel,
                 error = g_error_new_literal(G_IO_ERROR, err->error_code,
                                             _("Invalid filename of transferred file"));
                 break;
+            /* Note that if the switch doesn't handle some code, "error" is
+             * left NULL so it will be treated as default error and
+             * assigned a generic message. This is a wanted behaviour. */
             }
         }
         if (error == NULL) {


More information about the Spice-commits mailing list