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@xxxxxxxxxx> --- server/inputs_channel.c | 6 ++++++ server/reds.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 1a64e2d..c9c79be 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 bbff68e..822289b 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), -- 1.8.1.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel