示例#1
0
void
FileAction::unregisterActions(FileServer& server)
{
	ScopedMutex lock(&g_action_mutex);
	share_action_t::iterator it = g_share_actions.find(server.name());
	if (it != g_share_actions.end())
	{
		action_map_t::iterator iit = it->second.begin();
		for (; it->second.end() != iit; iit++)
		{
			delete iit->second;
			iit->second = NULL;
		}
		g_share_actions.erase(server.name());
	}
}
示例#2
0
void
FileAction::registerAction(FileServer& server, FileAction *action)
{
	ASSERT(action);
	ScopedMutex lock(&g_action_mutex);
	g_share_actions[server.name()][action->rule()] = action;
}