From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8A3EE29262 for ; Fri, 1 Jun 2018 16:56:02 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id deF6cc_e3YHQ for ; Fri, 1 Jun 2018 16:56:02 -0400 (EDT) Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 434562924A for ; Fri, 1 Jun 2018 16:56:02 -0400 (EDT) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH v3 2/4] session: enable box.session.push in local console Date: Fri, 1 Jun 2018 23:55:56 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org It is quite simple - just use stdout file descriptor as the destination for push messages. It is needed to make remote and local console be similar. --- src/box/lua/console.c | 1 + src/box/lua/console.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/box/lua/console.c b/src/box/lua/console.c index 49065a53c..edf8ad480 100644 --- a/src/box/lua/console.c +++ b/src/box/lua/console.c @@ -477,6 +477,7 @@ tarantool_lua_console_init(struct lua_State *L) /* .sync = */ generic_session_sync, }; session_vtab_registry[SESSION_TYPE_CONSOLE] = console_session_vtab; + session_vtab_registry[SESSION_TYPE_REPL] = console_session_vtab; } /* diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua index 6271b416b..a822a7fd9 100644 --- a/src/box/lua/console.lua +++ b/src/box/lua/console.lua @@ -353,7 +353,7 @@ local function start() self.history_file = home_dir .. '/.tarantool_history' internal.load_history(self.history_file) end - session_internal.create(-1, "repl") + session_internal.create(1, "repl") repl(self) started = false end -- 2.15.1 (Apple Git-101)