diff --git a/server/armv5-unknown-linux-gnueabihf/Controller.cpp b/server/armv5-unknown-linux-gnueabihf/Controller.cpp index 002e3b4..ad1e7f1 100644 --- a/server/armv5-unknown-linux-gnueabihf/Controller.cpp +++ b/server/armv5-unknown-linux-gnueabihf/Controller.cpp @@ -73,6 +73,8 @@ bool Controller::goToPlayer() { return true; } +bool Controller::Ready() { return initialized; } + int Controller::Initialize() { if (initialized) { return 0; diff --git a/server/armv5-unknown-linux-gnueabihf/Controller.moc b/server/armv5-unknown-linux-gnueabihf/Controller.moc index a9c76fc..e2a1b57 100644 --- a/server/armv5-unknown-linux-gnueabihf/Controller.moc +++ b/server/armv5-unknown-linux-gnueabihf/Controller.moc @@ -123,6 +123,8 @@ class Controller : public QObject { int Initialize(); + bool Ready(); + void Hide(Command::Command *c); void Show(Command::Command *c); diff --git a/server/armv5-unknown-linux-gnueabihf/server.cpp b/server/armv5-unknown-linux-gnueabihf/server.cpp index 99c6cfb..e3b3a05 100644 --- a/server/armv5-unknown-linux-gnueabihf/server.cpp +++ b/server/armv5-unknown-linux-gnueabihf/server.cpp @@ -36,9 +36,11 @@ void WampyServer::respond(QLocalSocket *socket, QByteArray data) { void WampyServer::Serve() { DLOG("serving\n"); - if (controller.Initialize() != 0) { - DLOG("initialize failed\n"); - return; + + while (!controller.Ready()) { + if (controller.Initialize() != 0) { + DLOG("initialize failed\n"); + } } auto t = controller.provider.thread();