only return true if plugins are actually newly registered

This commit is contained in:
Dane Springmeyer 2014-02-06 18:24:35 -08:00
parent dcb87dd935
commit 69de7f0a10

View file

@ -214,11 +214,13 @@ bool datasource_cache::register_datasource(std::string const& filename)
}
else
{
plugins_.insert(std::make_pair(plugin->name(),plugin));
MAPNIK_LOG_DEBUG(datasource_cache)
<< "datasource_cache: Registered="
<< plugin->name();
return true;
if (plugins_.insert(std::make_pair(plugin->name(),plugin)).second)
{
MAPNIK_LOG_ERROR(datasource_cache)
<< "datasource_cache: Registered="
<< plugin->name();
return true;
}
}
}
else