summaryrefslogtreecommitdiffstats
path: root/src/mad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mad.cpp')
-rw-r--r--src/mad.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mad.cpp b/src/mad.cpp
index c89487b..42afc87 100644
--- a/src/mad.cpp
+++ b/src/mad.cpp
@@ -35,10 +35,6 @@
using namespace Mad;
-static void requestFinished(Common::Request&) {
- Common::Logger::log("Identified.");
-}
-
int main() {
Net::ThreadManager::get()->init();
@@ -69,7 +65,13 @@ int main() {
//char hostname[256];
//gethostname(hostname, sizeof(hostname));
//Common::RequestManager::get()->sendRequest<Daemon::Requests::IdentifyRequest>(connection, sigc::ptr_fun(requestFinished), hostname);
- Common::RequestManager::get()->sendRequest1<Common::Requests::IdentifyRequest>(connection, "test", &requestFinished);
+ //Common::RequestManager::get()->sendRequest1<Common::Requests::IdentifyRequest>(connection, "test")->wait();
+ {
+ boost::shared_ptr<Common::Requests::IdentifyRequest> request(new Common::Requests::IdentifyRequest("test"));
+ Common::RequestManager::get()->sendRequest(connection, request);
+ request->wait();
+ }
+ Common::Logger::log("Identified.");
connection->waitWhileConnected();