From da1e560b42db03e6cf8bd49866975d63d4e9da84 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 25 Sep 2018 17:18:54 +0100 Subject: [PATCH] Fix failure to display the specials menu. I reworked the code for this at the last moment while preparing the Big Refactoring, having decided my previous design was overcomplicated and introducing an argument parameter (commit f4fbaa1bd) would be simpler. I carefully checked after the rework that specials manufactured by the code itself (e.g. SS_PING) came through OK, but apparently the one thing I _didn't_ test after the rework was that the specials list was actually returned correctly from ssh_get_specials to be incorporated into the GUI. In fact one stray if statement - both redundant even if it had been right, and also tested the wrong pointer - managed to arrange that when ssh->specials is NULL, it could never be overwritten by anything non-NULL. And of course it starts off initialised to NULL. Oops. --- ssh.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ssh.c b/ssh.c index 033c236a..e52b230f 100644 --- a/ssh.c +++ b/ssh.c @@ -966,9 +966,6 @@ static const SessionSpecial *ssh_get_specials(Backend *be) if (ssh->base_layer) ssh_ppl_get_specials(ssh->base_layer, ssh_add_special, &ctx); - if (!ssh->specials) - return NULL; - if (ctx.specials) { /* If the list is non-empty, terminate it with a SS_EXITMENU. */ ssh_add_special(&ctx, NULL, SS_EXITMENU, 0);