diff options
| author | Riccardo Spagni <ric@spagni.net> | 2015-05-20 14:36:04 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2015-05-20 14:36:07 +0200 |
| commit | 38068d07ca8ac5e00afb72b4dce2294742ef680f (patch) | |
| tree | 5fe223ef0927566948cefa06ac67b9c09839deb1 /src/daemon/command_parser_executor.cpp | |
| parent | 2939361d72e040e10c7b378facb32a56332ebd3b (diff) | |
| parent | f278fe3883f7d708082a19856eda02fddaf2fc56 (diff) | |
| download | monzero-core-38068d07ca8ac5e00afb72b4dce2294742ef680f.tar.gz monzero-core-38068d07ca8ac5e00afb72b4dce2294742ef680f.tar.xz monzero-core-38068d07ca8ac5e00afb72b4dce2294742ef680f.zip | |
Merge pull request #288
f278fe3 s/terget/target/ (moneromooo-monero)
d8ee0a9 print limits when running limit commands with no arguments (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
| -rw-r--r-- | src/daemon/command_parser_executor.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index fd7b40be2..1b86ff269 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -251,7 +251,10 @@ bool t_command_parser_executor::print_status(const std::vector<std::string>& arg bool t_command_parser_executor::set_limit(const std::vector<std::string>& args) { - if(args.size()!=1) return false; + if(args.size()>1) return false; + if(args.size()==0) { + return m_executor.get_limit(); + } int limit; try { limit = std::stoi(args[0]); @@ -267,7 +270,10 @@ bool t_command_parser_executor::set_limit(const std::vector<std::string>& args) bool t_command_parser_executor::set_limit_up(const std::vector<std::string>& args) { - if(args.size()!=1) return false; + if(args.size()>1) return false; + if(args.size()==0) { + return m_executor.get_limit_up(); + } int limit; try { limit = std::stoi(args[0]); @@ -283,7 +289,10 @@ bool t_command_parser_executor::set_limit_up(const std::vector<std::string>& arg bool t_command_parser_executor::set_limit_down(const std::vector<std::string>& args) { - if(args.size()!=1) return false; + if(args.size()>1) return false; + if(args.size()==0) { + return m_executor.get_limit_down(); + } int limit; try { limit = std::stoi(args[0]); |
