rib: Switching to use global IO

Change-Id: I5eca302c65d868810bd59ab654b7ea74762dc7ee
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 27f7f3c..6cb0d6b 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -24,6 +24,7 @@
  **/
 
 #include "rib-manager.hpp"
+#include "core/global-io.hpp"
 #include "core/logger.hpp"
 
 namespace nfd {
@@ -56,8 +57,14 @@
                      ),
   };
 
+inline static void
+NullDeleter(boost::asio::io_service* variable)
+{
+  // do nothing
+}
+
 RibManager::RibManager()
-  : m_face(new ndn::Face())
+  : m_face(new ndn::Face(shared_ptr<boost::asio::io_service>(&getGlobalIoService(), &NullDeleter)))
   , m_nfdController(new ndn::nfd::Controller(*m_face))
   , m_validator(m_face)
   , m_faceMonitor(*m_face)
@@ -296,13 +303,6 @@
     bind(&RibManager::onCommandError, this, _1, _2, request, options));
 }
 
-boost::asio::io_service&
-RibManager::getIoService()
-{
-  /// \todo Switch face to use global io service (needs library update)
-  return *m_face->ioService();
-}
-
 void
 RibManager::onControlHeaderSuccess()
 {