diff --git a/store/qwstore/server.cc b/store/qwstore/server.cc index 0f905f5fca11c930114337f432ee7bdda951d401..2b651f59498942ef1812afb77023e2e1c5578c65 100644 --- a/store/qwstore/server.cc +++ b/store/qwstore/server.cc @@ -12,7 +12,7 @@ namespace qwstore { using namespace proto; -Server::Server(const specpaxos::Configuration &configuration, int myIdx, +Server::Server(const transport::Configuration &configuration, int myIdx, Transport *transport, QWStore *store) : store(store), configuration(configuration), myIdx(myIdx), transport(transport) { @@ -80,6 +80,8 @@ Server::Load(const string &key, const string &value) store->Load(key, value); } +} // namespace qwstore + static void Usage(const char *progName) { fprintf(stderr, "usage: %s -c conf-file -i replica-index\n", @@ -141,7 +143,7 @@ main(int argc, char **argv) configPath); Usage(argv[0]); } - specpaxos::Configuration config(configStream); + transport::Configuration config(configStream); if (index >= config.n) { fprintf(stderr, "replica index %d is out of bounds; " @@ -150,13 +152,13 @@ main(int argc, char **argv) } UDPTransport transport(0.0, 0.0, 0); - Server *server; + qwstore::Server *server; - server = new Server(config, index, &transport, new QWStore()); + server = new qwstore::Server(config, index, &transport, new qwstore::QWStore()); if (keyPath) { string key; - ifstream in; + std::ifstream in; in.open(keyPath); if (!in) { fprintf(stderr, "Could not read keys from: %s\n", keyPath); @@ -173,5 +175,3 @@ main(int argc, char **argv) return 0; } - -} // namespace qwstore diff --git a/store/qwstore/server.h b/store/qwstore/server.h index de4112b7e9a484bb97668b2fdccf912cc8d369eb..2e24ad13b946afefe8d5275be01a8e2b39081504 100644 --- a/store/qwstore/server.h +++ b/store/qwstore/server.h @@ -28,14 +28,14 @@ private: QWStore *store; // Configuration of replicas. - specpaxos::Configuration configuration; + transport::Configuration configuration; // Index of 'this' replica, and handle to transport layer. int myIdx; Transport *transport; public: - Server(const specpaxos::Configuration &configuration, int myIdx, + Server(const transport::Configuration &configuration, int myIdx, Transport *transport, QWStore *store); ~Server();