Instance: make "partition" a std::list

With this commit, multi-player support becomes possible... it's just
not wired to the frontend yet.

This is based on massive amounts of refactoring work I did over the
past 9 years.
This commit is contained in:
Max Kellermann
2017-02-17 23:21:20 +01:00
parent 9a909d9f27
commit 77178e0590
4 changed files with 42 additions and 24 deletions

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "PartitionCommands.hxx"
#include "Request.hxx"
#include "Instance.hxx"
#include "Partition.hxx"
#include "client/Client.hxx"
#include "client/Response.hxx"
@@ -27,6 +28,9 @@
CommandResult
handle_listpartitions(Client &client, Request, Response &r)
{
r.Format("partition: %s\n", client.partition.name.c_str());
for (const auto &partition : client.partition.instance.partitions) {
r.Format("partition: %s\n", partition.name.c_str());
}
return CommandResult::OK;
}