From 8d44aa032892ea6643925fa7485d9af32853e127 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 14 Mar 2013 17:15:55 +0100 Subject: 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 --- server/inputs_channel.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/inputs_channel.c') 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, -- cgit