Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: kostja@tarantool.org
Subject: [tarantool-patches] [PATCH v3 2/4] session: enable box.session.push in local console
Date: Fri,  1 Jun 2018 23:55:56 +0300	[thread overview]
Message-ID: <ae85f2a044f0f447c4a7a6062c4c3a68a75d4ea3.1527886471.git.v.shpilevoy@tarantool.org> (raw)
In-Reply-To: <cover.1527886471.git.v.shpilevoy@tarantool.org>
In-Reply-To: <cover.1527886471.git.v.shpilevoy@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)

  parent reply	other threads:[~2018-06-01 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 20:55 [tarantool-patches] [PATCH v3 0/4] box.session.push Vladislav Shpilevoy
2018-06-01 20:55 ` [tarantool-patches] [PATCH v3 1/4] session: introduce text box.session.push Vladislav Shpilevoy
2018-06-01 20:55 ` Vladislav Shpilevoy [this message]
2018-06-01 20:55 ` [tarantool-patches] [PATCH v3 3/4] session: introduce binary box.session.push Vladislav Shpilevoy
2018-06-07 12:53   ` [tarantool-patches] " Konstantin Osipov
2018-06-07 17:02     ` Vladislav Shpilevoy
2018-06-08  3:51       ` Konstantin Osipov
2018-06-01 20:55 ` [tarantool-patches] [PATCH v3 4/4] netbox: introduce iterable future objects Vladislav Shpilevoy
2018-06-07 12:56   ` [tarantool-patches] " Konstantin Osipov
2018-06-07 17:02     ` Vladislav Shpilevoy
2018-06-08  3:52       ` Konstantin Osipov
2018-06-08 14:20         ` Vladislav Shpilevoy

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=ae85f2a044f0f447c4a7a6062c4c3a68a75d4ea3.1527886471.git.v.shpilevoy@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v3 2/4] session: enable box.session.push in local console' \
    /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