Example #1
0
MojErr MojService::dispatchCancel(const SubscriptionKey& key)
{
	MojAssertMutexUnlocked(m_mutex);
	MojLogTrace(s_log);
	MojThreadGuard guard(m_mutex);

	SubscriptionMap::ConstIterator i = m_subscriptions.find(key);
	if (i != m_subscriptions.end()) {
		MojRefCountedPtr<MojServiceMessage> msg = *i;
		guard.unlock();

		MojErr err = msg->dispatchCancel();
		MojErrCatchAll(err);
	}
	return MojErrNone;
}