Merge remote-tracking branch 'git.irl/master'

Conflicts:
	src/dispatcher.cc
diff --git a/src/dispatcher.cc b/src/dispatcher.cc
index bdcc469..d7e570a 100644
--- a/src/dispatcher.cc
+++ b/src/dispatcher.cc
@@ -37,13 +37,19 @@
            , m_objectManager(ccnx, rootDir)
            , m_localUserName(localUserName)
            , m_sharedFolder(sharedFolder)
+           , m_server(NULL)
 {
   m_syncLog = make_shared<SyncLog>(path, localUserName);
   m_actionLog = make_shared<ActionLog>(m_ccnx, path, m_syncLog, sharedFolder);
+  Name syncPrefix = Name(BROADCAST_DOMAIN)(sharedFolder);
 
-  Name syncPrefix(BROADCAST_DOMAIN + sharedFolder);
+  m_server = new ContentServer(m_ccnx, m_actionLog, rootDir);
+  m_server->registerPrefix(localPrefix);
+  m_server->registerPrefix(syncPrefix);
+
   m_core = new SyncCore (m_syncLog, localUserName, localPrefix, syncPrefix,
                          bind(&Dispatcher::syncStateChanged, this, _1), ccnx, scheduler);
+
 }
 
 Dispatcher::~Dispatcher()
@@ -53,6 +59,12 @@
     delete m_core;
     m_core = NULL;
   }
+
+  if (m_server != NULL)
+  {
+    delete m_server;
+    m_server = NULL;
+  }
 }
 
 void
@@ -115,8 +127,8 @@
           int seg_num;
           tie (hash, seg_num) = m_objectManager.localFileToObjects (absolutePath, m_localUserName);
 
-          time_t wtime = filesystem::last_write_time (absolutePath);
-          filesystem::file_status stat = filesystem::status (absolutePath);
+          time_t wtime = filesystem::last_write_time(absolutePath);
+          filesystem::file_status stat = filesystem::status(absolutePath);
           int mode = stat.permissions();
 
           m_actionLog->AddLocalActionUpdate (relativeFilePath.generic_string(), *hash, wtime, mode, seg_num);