diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-03-14 17:15:55 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-03-15 09:44:50 +0100 |
commit | 8d44aa032892ea6643925fa7485d9af32853e127 (patch) | |
tree | a070355d985e492d62bb2b8924c6a2b3b6272a0e | |
parent | 0711a4a464ca90f5ac34ba1363a8c4916d415103 (diff) | |
download | spice-8d44aa032892ea6643925fa7485d9af32853e127.tar.gz spice-8d44aa032892ea6643925fa7485d9af32853e127.tar.xz spice-8d44aa032892ea6643925fa7485d9af32853e127.zip |
inputs-channel: Handle printing of insecure keyboard notify
This is clearly something which should be handled in the inputs_channel code,
rather then having a special case for it in the generic channel handling
code in reds.c. Moving it here also fixes the TODO we had on only sending
this message to new clients.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | server/inputs_channel.c | 6 | ||||
-rw-r--r-- | server/reds.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 1a64e2dd..c9c79be4 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -37,6 +37,7 @@ #include "red_common.h" #include "reds.h" #include "red_channel.h" +#include "main_channel.h" #include "inputs_channel.h" #include "migration_protocol.h" @@ -521,6 +522,11 @@ static void inputs_connect(RedChannel *channel, RedClient *client, spice_assert(g_inputs_channel); spice_assert(channel == &g_inputs_channel->base); + if (!stream->ssl) { + main_channel_client_push_notify(red_client_get_main(client), + "keyboard channel is insecure"); + } + spice_printerr("inputs channel client create"); icc = (InputsChannelClient*)red_channel_client_create(sizeof(InputsChannelClient), channel, diff --git a/server/reds.c b/server/reds.c index bbff68e5..822289bc 100644 --- a/server/reds.c +++ b/server/reds.c @@ -1747,11 +1747,6 @@ static void reds_channel_do_link(RedChannel *channel, RedClient *client, spice_assert(link_msg); spice_assert(stream); - if (link_msg->channel_type == SPICE_CHANNEL_INPUTS && !stream->ssl) { - const char *mess = "keyboard channel is insecure"; - main_channel_push_notify(reds->main_channel, mess); - } - caps = (uint32_t *)((uint8_t *)link_msg + link_msg->caps_offset); channel->client_cbs.connect(channel, client, stream, red_client_during_migrate_at_target(client), |