update test
diff --git a/log4cxx.properties b/log4cxx.properties
index a3663c4..9593e06 100644
--- a/log4cxx.properties
+++ b/log4cxx.properties
@@ -13,7 +13,7 @@
log4j.logger.Executor = ERROR
log4j.logger.Sync.Log = ERROR
-log4j.logger.Sync.Core = DEBUG
+log4j.logger.Sync.Core = ERROR
log4j.logger.Scheduler = ERROR
#log4j.logger.Sync = DEBUG
diff --git a/src/content-server.cc b/src/content-server.cc
index 0cf5c43..a5aaf31 100644
--- a/src/content-server.cc
+++ b/src/content-server.cc
@@ -59,9 +59,13 @@
void
ContentServer::registerPrefix(const Name &prefix)
{
- _LOG_DEBUG (">> register " << prefix);
- m_ccnx->setInterestFilter (Name (prefix)(m_deviceName)("action")(m_sharedFolderName), bind(&ContentServer::serve_Action, this, prefix, _1));
- m_ccnx->setInterestFilter (Name (prefix)(m_deviceName)("file"), bind(&ContentServer::serve_File, this, prefix, _1));
+ Name actionPrefix = Name (prefix)(m_deviceName)("action")(m_sharedFolderName);
+ Name filePrefix = Name (prefix)(m_deviceName)("file");
+ m_ccnx->setInterestFilter (actionPrefix, bind(&ContentServer::serve_Action, this, prefix, _1));
+ m_ccnx->setInterestFilter (filePrefix, bind(&ContentServer::serve_File, this, prefix, _1));
+
+ _LOG_DEBUG (">> content server: register " << actionPrefix);
+ _LOG_DEBUG (">> content server: register " << filePrefix);
ScopedLock lock (m_mutex);
m_prefixes.insert(prefix);
@@ -70,11 +74,14 @@
void
ContentServer::deregisterPrefix (const Name &prefix)
{
- _LOG_DEBUG ("<< deregister " << prefix);
+ Name actionPrefix = Name (prefix)(m_deviceName)("action")(m_sharedFolderName);
+ Name filePrefix = Name (prefix)(m_deviceName)("file");
- m_ccnx->clearInterestFilter(Name (prefix)(m_deviceName)("action")(m_sharedFolderName));
- m_ccnx->clearInterestFilter(Name (prefix)(m_deviceName)("file"));
+ m_ccnx->clearInterestFilter(actionPrefix);
+ m_ccnx->clearInterestFilter(filePrefix);
+ _LOG_DEBUG ("<< content server: deregister " << actionPrefix);
+ _LOG_DEBUG ("<< content server: deregister " << filePrefix);
ScopedLock lock (m_mutex);
m_prefixes.erase (prefix);
}
@@ -82,6 +89,7 @@
void
ContentServer::serve_Action (Name forwardingHint, const Name &interest)
{
+ _LOG_DEBUG (">> content server serving, forwardHing " << forwardingHint << ", interest " << interest);
m_executor.execute (bind (&ContentServer::serve_Action_Execute, this, forwardingHint, interest));
// need to unlock ccnx mutex... or at least don't lock it
}
@@ -89,6 +97,7 @@
void
ContentServer::serve_File (Name forwardingHint, const Name &interest)
{
+ _LOG_DEBUG (">> content server serving, forwardHing " << forwardingHint << ", interest " << interest);
m_executor.execute (bind (&ContentServer::serve_File_Execute, this, forwardingHint, interest));
// need to unlock ccnx mutex... or at least don't lock it
}
diff --git a/src/object-db.cc b/src/object-db.cc
index d153228..6c2b786 100644
--- a/src/object-db.cc
+++ b/src/object-db.cc
@@ -142,7 +142,7 @@
sqlite3_bind_blob (stmt, 3, &data[0], data.size (), SQLITE_STATIC);
sqlite3_step (stmt);
- _LOG_DEBUG ("After saving object: " << sqlite3_errmsg (m_db));
+ //_LOG_DEBUG ("After saving object: " << sqlite3_errmsg (m_db));
sqlite3_finalize (stmt);
}
diff --git a/test/test-dispatcher.cc b/test/test-dispatcher.cc
index f81d807..838f8d7 100644
--- a/test/test-dispatcher.cc
+++ b/test/test-dispatcher.cc
@@ -75,7 +75,7 @@
usleep(100);
Dispatcher d2(user2, folder, dir2, ccnx2);
- usleep(1000000);
+ usleep(14900000);
_LOG_DEBUG ("checking obama vs romney");
checkRoots(d1.SyncRoot(), d2.SyncRoot());
@@ -87,7 +87,7 @@
ofstream ofs;
ofs.open(abf.string().c_str());
- for (int i = 0; i < 1000; i ++)
+ for (int i = 0; i < 5000; i ++)
{
ofs << words;
}
@@ -95,7 +95,7 @@
d1.Did_LocalFile_AddOrModify(filename);
- sleep(2);
+ sleep(5);
fs::path ef = dir2 / filename;
BOOST_REQUIRE_MESSAGE(fs::exists(ef), user1 << " failed to notify " << user2 << " about " << filename.string());