aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorrbrunner7 <rbrunner@dreamshare.ch>2018-04-25 21:37:10 +0200
committerrbrunner7 <rbrunner@dreamshare.ch>2018-04-25 21:37:10 +0200
commitf9d0827bba2e1d453915efb65171b2475f4ebcfd (patch)
tree9e15784e451a82773777a4ce8d2f39cfc3d34d02 /src/daemon
parentMerge pull request #3670 (diff)
downloadmonero-f9d0827bba2e1d453915efb65171b2475f4ebcfd.tar.xz
Fix broken interactive daemon 'limit' commands plus RPC calls
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/command_parser_executor.cpp6
-rw-r--r--src/daemon/rpc_command_executor.cpp12
2 files changed, 6 insertions, 12 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 28a7f1366..8b51b9b85 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -380,8 +380,6 @@ bool t_command_parser_executor::set_limit(const std::vector<std::string>& args)
std::cout << "failed to parse argument" << std::endl;
return false;
}
- if (limit > 0)
- limit *= 1024;
return m_executor.set_limit(limit, limit);
}
@@ -400,8 +398,6 @@ bool t_command_parser_executor::set_limit_up(const std::vector<std::string>& arg
std::cout << "failed to parse argument" << std::endl;
return false;
}
- if (limit > 0)
- limit *= 1024;
return m_executor.set_limit(0, limit);
}
@@ -420,8 +416,6 @@ bool t_command_parser_executor::set_limit_down(const std::vector<std::string>& a
std::cout << "failed to parse argument" << std::endl;
return false;
}
- if (limit > 0)
- limit *= 1024;
return m_executor.set_limit(limit, 0);
}
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 73b8d1a18..64ce3a406 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -1176,8 +1176,8 @@ bool t_rpc_command_executor::get_limit()
}
}
- tools::msg_writer() << "limit-down is " << res.limit_down/1024 << " kB/s";
- tools::msg_writer() << "limit-up is " << res.limit_up/1024 << " kB/s";
+ tools::msg_writer() << "limit-down is " << res.limit_down << " kB/s";
+ tools::msg_writer() << "limit-up is " << res.limit_up << " kB/s";
return true;
}
@@ -1207,8 +1207,8 @@ bool t_rpc_command_executor::set_limit(int64_t limit_down, int64_t limit_up)
}
}
- tools::msg_writer() << "Set limit-down to " << res.limit_down/1024 << " kB/s";
- tools::msg_writer() << "Set limit-up to " << res.limit_up/1024 << " kB/s";
+ tools::msg_writer() << "Set limit-down to " << res.limit_down << " kB/s";
+ tools::msg_writer() << "Set limit-up to " << res.limit_up << " kB/s";
return true;
}
@@ -1235,7 +1235,7 @@ bool t_rpc_command_executor::get_limit_up()
}
}
- tools::msg_writer() << "limit-up is " << res.limit_up/1024 << " kB/s";
+ tools::msg_writer() << "limit-up is " << res.limit_up << " kB/s";
return true;
}
@@ -1262,7 +1262,7 @@ bool t_rpc_command_executor::get_limit_down()
}
}
- tools::msg_writer() << "limit-down is " << res.limit_down/1024 << " kB/s";
+ tools::msg_writer() << "limit-down is " << res.limit_down << " kB/s";
return true;
}