Make it easier to insert code between when the server is setup and when it's started.

This commit is contained in:
JoelKatz
2013-01-09 23:55:39 -08:00
parent 1e2b11fe80
commit 376f214a70
3 changed files with 12 additions and 2 deletions

View File

@@ -17,9 +17,14 @@ extern bool AddSystemEntropy();
using namespace std;
using namespace boost::unit_test;
void startServer()
void setupServer()
{
theApp = new Application();
theApp->setup();
}
void startServer()
{
theApp->run(); // Blocks till we get a stop RPC.
}
@@ -194,6 +199,7 @@ int main(int argc, char* argv[])
else if (!vm.count("parameters"))
{
// No arguments. Run server.
setupServer();
startServer();
}
else