From 86ea2cfc5d723b732956c13a1bb5fc07762bfe74 Mon Sep 17 00:00:00 2001 From: Alf-Rune Siqveland Date: Tue, 16 Mar 2021 08:58:52 +0100 Subject: [PATCH] Inform session if terminal feature is enabled This was left out by mistake when introducing the handshake. changelog: none Signed-off-by: Alf-Rune Siqveland --- app/daemon.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/daemon.go b/app/daemon.go index 93fb0cc7..2b324e6b 100644 --- a/app/daemon.go +++ b/app/daemon.go @@ -92,6 +92,11 @@ func NewDaemon(conf *config.MenderShellConfig) *MenderShellDaemon { // Setup ProtoMsg routes. routes := make(session.ProtoRoutes) + if !conf.Terminal.Disable { + // Shell message is not handled by the Session, but the map + // entry must be set to give the correct 'accept' response. + routes[ws.ProtoTypeShell] = nil + } if !conf.FileTransfer.Disable { routes[ws.ProtoTypeFileTransfer] = session.FileTransfer() }