Changing naming convention
Format for files: /<forwarding-hint>/<appname>/file/<hash>/<device_name>/<segment>
Format for actions: /<forwarding-hint>/<appname>/<shared-folder>/action/<device_name>/<action-seq>
All tests pass
Change-Id: Ie42c0f29813839ca7cc42fa52b5c3f246da2e130
diff --git a/src/fetcher.cc b/src/fetcher.cc
index 044c5ca..3334040 100644
--- a/src/fetcher.cc
+++ b/src/fetcher.cc
@@ -199,7 +199,10 @@
// tell FetchManager that we have finish our job
// m_onFetchComplete (*this);
// using executor, so we won't be deleted if there is scheduled FillPipeline call
- m_executor->execute (bind (m_onFetchComplete, ref(*this), m_deviceName, m_name));
+ if (!m_onFetchComplete.empty ())
+ {
+ m_executor->execute (bind (m_onFetchComplete, ref(*this), m_deviceName, m_name));
+ }
}
else
{
@@ -210,6 +213,7 @@
void
Fetcher::OnTimeout (uint64_t seqno, const Ccnx::Name &name, const Closure &closure, Selectors selectors)
{
+ _LOG_DEBUG (this << ", " << m_executor.get ());
m_executor->execute (bind (&Fetcher::OnTimeout_Execute, this, seqno, name, closure, selectors));
}
@@ -247,7 +251,10 @@
}
m_active = false;
- m_onFetchFailed (ref (*this));
+ if (!m_onFetchFailed.empty ())
+ {
+ m_onFetchFailed (ref (*this));
+ }
// this is not valid anymore, but we still should be able finish work
}
}