aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/main.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-10-28 19:13:42 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-14 17:06:26 +0000
commite89994e98f85be95d68c7bf471fcadf9aabbc93a (patch)
tree2cb9f29bc15e4488eeaeee81115d791babced4fc /src/daemon/main.cpp
parentmove input_line from command_line to simplewallet (diff)
downloadmonero-e89994e98f85be95d68c7bf471fcadf9aabbc93a.tar.xz
wallet: rejig to avoid prompting in wallet2
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
Diffstat (limited to 'src/daemon/main.cpp')
-rw-r--r--src/daemon/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index e7aaa22c1..ae83943b6 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -247,7 +247,12 @@ int main(int argc, char const * argv[])
if (command_line::has_arg(vm, arg.rpc_login))
{
login = tools::login::parse(
- command_line::get_arg(vm, arg.rpc_login), false, "Daemon client password"
+ command_line::get_arg(vm, arg.rpc_login), false, [](bool verify) {
+#ifdef HAVE_READLINE
+ rdln::suspend_readline pause_readline;
+#endif
+ return tools::password_container::prompt(verify, "Daemon client password");
+ }
);
if (!login)
{