diff options
| author | Riccardo Spagni <ric@spagni.net> | 2018-02-16 14:18:38 +0100 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2018-02-16 14:18:38 +0100 |
| commit | 381faf06c7f9174ab5aaad909d57c66c612533de (patch) | |
| tree | fbfbd442ea2290b7efff45042b221b480a1facd0 /src/daemon/command_parser_executor.cpp | |
| parent | 0bffd2ec6440af6dd9cd86682e647fccafb7c234 (diff) | |
| parent | 628b78ae8ac5e702c0f33c5231877e8405e1b417 (diff) | |
| download | monzero-core-381faf06c7f9174ab5aaad909d57c66c612533de.tar.gz monzero-core-381faf06c7f9174ab5aaad909d57c66c612533de.tar.xz monzero-core-381faf06c7f9174ab5aaad909d57c66c612533de.zip | |
Merge pull request #3163
628b78ae Fix in_peers/out_peers RPC operations (Erik de Castro Lopo)
ece9bcf5 rpc_client: Fix error handling (Erik de Castro Lopo)
8f30350d Fix method name in invoke_http_json_rpc (Erik de Castro Lopo)
32c0f908 Allow the number of incoming connections to be limited (Erik de Castro Lopo)
d609a2c1 Rename delete_connections to delete_out_connections (Erik de Castro Lopo)
b927c0fc Rename connections_count to max_out_connection_count (Erik de Castro Lopo)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
| -rw-r--r-- | src/daemon/command_parser_executor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 3ec74ff79..09e425dd1 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -428,6 +428,23 @@ bool t_command_parser_executor::out_peers(const std::vector<std::string>& args) return m_executor.out_peers(limit); } +bool t_command_parser_executor::in_peers(const std::vector<std::string>& args) +{ + if (args.empty()) return false; + + unsigned int limit; + try { + limit = std::stoi(args[0]); + } + + catch(const std::exception& ex) { + _erro("stoi exception"); + return false; + } + + return m_executor.in_peers(limit); +} + bool t_command_parser_executor::start_save_graph(const std::vector<std::string>& args) { if (!args.empty()) return false; |
