only return true if plugins are actually newly registered
This commit is contained in:
parent
88613fc2ec
commit
3d90715883
1 changed files with 7 additions and 5 deletions
|
@ -213,11 +213,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
|
||||
|
|
Loading…
Reference in a new issue