summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-02-10 15:03:23 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2011-02-19 00:16:44 +0100
commit053bed3f0c49c4b765cdf726b1824b89a8411f50 (patch)
tree64f2125bd5ea0838515255639414ca692b4769c7
parent2d9ed06339499e252c5b947794088f18dc6df165 (diff)
gtk: add error block to spice_channel_recv_link_msg()
-rw-r--r--gtk/spice-channel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index 1a2b5e9..08bcc2c 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1009,9 +1009,7 @@ static void spice_channel_recv_link_msg(SpiceChannel *channel)
default:
g_warning("%s: %s: unhandled error %d",
c->name, __FUNCTION__, c->peer_msg->error);
- SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel);
- emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_LINK);
- return;
+ goto error;
}
num_caps = c->peer_msg->num_channel_caps + c->peer_msg->num_common_caps;
@@ -1036,6 +1034,12 @@ static void spice_channel_recv_link_msg(SpiceChannel *channel)
c->state = SPICE_CHANNEL_STATE_AUTH;
spice_channel_send_auth(channel);
+
+ return;
+
+error:
+ SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel);
+ emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_LINK);
}
/* system context */