build: Fixes for the latest updates in ndn-cxx library

Change-Id: I35d7ed69243b1e726fc74111aa5750c9f8d6f892
diff --git a/src/logger.hpp b/src/logger.hpp
index 706c6df..25847a4 100644
--- a/src/logger.hpp
+++ b/src/logger.hpp
@@ -11,6 +11,7 @@
 #define NTG_LOGGER_HPP
 
 #include <string>
+#include <fstream>
 #include <boost/filesystem.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 
diff --git a/src/ndn-traffic-client.cpp b/src/ndn-traffic-client.cpp
index 3cc2aac..80a79da 100644
--- a/src/ndn-traffic-client.cpp
+++ b/src/ndn-traffic-client.cpp
@@ -36,7 +36,6 @@
     , m_logger("NdnTrafficClient")
     , m_hasError(false)
     , m_hasQuietLogging(false)
-    , m_ioService(new boost::asio::io_service)
     , m_face(m_ioService)
     , m_interestInterval(getDefaultInterestInterval())
     , m_nMaximumInterests(-1)
@@ -307,7 +306,7 @@
     logStatistics();
     m_logger.shutdownLogger();
     m_face.shutdown();
-    m_ioService->stop();
+    m_ioService.stop();
     if (m_hasError)
       exit(1);
     else
@@ -569,7 +568,7 @@
         logStatistics();
         m_logger.shutdownLogger();
         m_face.shutdown();
-        m_ioService->stop();
+        m_ioService.stop();
       }
   }
 
@@ -590,7 +589,7 @@
         logStatistics();
         m_logger.shutdownLogger();
         m_face.shutdown();
-        m_ioService->stop();
+        m_ioService.stop();
       }
   }
 
@@ -747,7 +746,7 @@
   void
   run()
   {
-    boost::asio::signal_set signalSet(*m_ioService, SIGINT, SIGTERM);
+    boost::asio::signal_set signalSet(m_ioService, SIGINT, SIGTERM);
     signalSet.async_wait(bind(&NdnTrafficClient::signalHandler, this));
     m_logger.initializeLog(m_instanceId);
     initializeTrafficConfiguration();
@@ -760,7 +759,7 @@
       }
 
     boost::asio::deadline_timer deadlineTimer(
-      *m_ioService,
+      m_ioService,
       boost::posix_time::millisec(m_interestInterval.count()));
     deadlineTimer.async_wait(bind(&NdnTrafficClient::generateTraffic,
                                   this, &deadlineTimer));
@@ -771,7 +770,7 @@
       m_logger.log("ERROR: " + static_cast<std::string>(e.what()), true, true);
       m_logger.shutdownLogger();
       m_hasError = true;
-      m_ioService->stop();
+      m_ioService.stop();
     }
   }
 
@@ -785,7 +784,7 @@
   int m_nMaximumInterests;
   Logger m_logger;
   std::string m_configurationFile;
-  shared_ptr<boost::asio::io_service> m_ioService;
+  boost::asio::io_service m_ioService;
   Face m_face;
   std::vector<InterestTrafficConfiguration> m_trafficPatterns;
   std::vector<uint32_t> m_nonces;
diff --git a/src/ndn-traffic-server.cpp b/src/ndn-traffic-server.cpp
index 916b0e4..4bf50cc 100644
--- a/src/ndn-traffic-server.cpp
+++ b/src/ndn-traffic-server.cpp
@@ -35,7 +35,6 @@
     , m_nMaximumInterests(-1)
     , m_nInterestsReceived(0)
     , m_contentDelay(time::milliseconds(-1))
-    , m_ioService(new boost::asio::io_service)
     , m_face(m_ioService)
   {
     m_instanceId = boost::lexical_cast<std::string>(std::rand());
@@ -211,7 +210,7 @@
     logStatistics();
     m_logger.shutdownLogger();
     m_face.shutdown();
-    m_ioService->stop();
+    m_ioService.stop();
     if (m_hasError)
       exit(1);
     else
@@ -391,7 +390,7 @@
         logStatistics();
         m_logger.shutdownLogger();
         m_face.shutdown();
-        m_ioService->stop();
+        m_ioService.stop();
       }
   }
 
@@ -414,7 +413,7 @@
   void
   run()
   {
-    boost::asio::signal_set signalSet(*m_ioService, SIGINT, SIGTERM);
+    boost::asio::signal_set signalSet(m_ioService, SIGINT, SIGTERM);
     signalSet.async_wait(boost::bind(&NdnTrafficServer::signalHandler, this));
     m_logger.initializeLog(m_instanceId);
     initializeTrafficConfiguration();
@@ -443,7 +442,7 @@
       m_logger.log("ERROR: " + static_cast<std::string>(e.what()), true, true);
       m_logger.shutdownLogger();
       m_hasError = true;
-      m_ioService->stop();
+      m_ioService.stop();
     }
   }
 
@@ -457,7 +456,7 @@
   int m_nRegistrationsFailed;
   Logger m_logger;
   std::string m_configurationFile;
-  shared_ptr<boost::asio::io_service> m_ioService;
+  boost::asio::io_service m_ioService;
   Face m_face;
   std::vector<DataTrafficConfiguration> m_trafficPatterns;
   int m_nMaximumInterests;