From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Subject: [Tarantool-patches] [PATCH 2/2] box/console: Test for exact command before setting eos Date: Thu, 17 Oct 2019 00:35:31 +0300 [thread overview] Message-ID: <20191016213531.1825-3-gorcunov@gmail.com> (raw) In-Reply-To: <20191016213531.1825-1-gorcunov@gmail.com> When we handle unix console connection we should setup eos if only we meet "\set output" command in a stream. For example there could be "\set language" which should not affect eos settings. Closes #4568 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- src/box/lua/console.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index e1941f85d..f70ed830a 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -416,9 +416,14 @@ local text_connection_mt = { end local nr_items, items = parse_operators(command) if nr_items == 3 then - local err, fmt, opts = parse_output(items[3]) - if not err then - self.eos = output_eos[fmt] + -- + -- Make sure it is exactly "\set output" command. + if operators[items[1]] == set_param and + param_handlers[items[2]] == set_output then + local err, fmt, opts = parse_output(items[3]) + if not err then + self.eos = output_eos[fmt] + end end end end, -- 2.20.1
prev parent reply other threads:[~2019-10-16 21:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-16 21:35 [Tarantool-patches] [PATCH 0/2] box/console: Fix hang on remote console enter Cyrill Gorcunov 2019-10-16 21:35 ` [Tarantool-patches] [PATCH 1/2] box/console: Move param handlers into file scope Cyrill Gorcunov 2019-10-16 21:35 ` Cyrill Gorcunov [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191016213531.1825-3-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/2] box/console: Test for exact command before setting eos' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox