aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/NeighborCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/NeighborCommands.cxx')
-rw-r--r--src/command/NeighborCommands.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/command/NeighborCommands.cxx b/src/command/NeighborCommands.cxx
index 10dbe3074..d1b2ec7c7 100644
--- a/src/command/NeighborCommands.cxx
+++ b/src/command/NeighborCommands.cxx
@@ -21,9 +21,9 @@
#include "NeighborCommands.hxx"
#include "Request.hxx"
#include "client/Client.hxx"
+#include "client/Response.hxx"
#include "Instance.hxx"
#include "Partition.hxx"
-#include "protocol/Result.hxx"
#include "neighbor/Glue.hxx"
#include "neighbor/Info.hxx"
#include "util/ConstBuffer.hxx"
@@ -42,19 +42,19 @@ neighbor_commands_available(const Instance &instance)
CommandResult
handle_listneighbors(Client &client, gcc_unused Request args)
{
+ Response r(client);
+
const NeighborGlue *const neighbors =
client.partition.instance.neighbors;
if (neighbors == nullptr) {
- command_error(client, ACK_ERROR_UNKNOWN,
- "No neighbor plugin configured");
+ r.Error(ACK_ERROR_UNKNOWN, "No neighbor plugin configured");
return CommandResult::ERROR;
}
for (const auto &i : neighbors->GetList())
- client_printf(client,
- "neighbor: %s\n"
- "name: %s\n",
- i.uri.c_str(),
- i.display_name.c_str());
+ r.Format("neighbor: %s\n"
+ "name: %s\n",
+ i.uri.c_str(),
+ i.display_name.c_str());
return CommandResult::OK;
}