+ // Using last match wins. Did we already have one?
+ if (held) {
+ if (ret.second) {
+ // We had a "complete" match, so log it.
+ if (criteria.entityID_ascii) {
+ m_log.warn("found duplicate EntityDescriptor (%s) with role (%s), using last matching copy",
+ criteria.entityID_ascii, criteria.role->toString().c_str());
+ }
+ else if (criteria.entityID_unicode) {
+ auto_ptr_char temp(criteria.entityID_unicode);
+ m_log.warn("found duplicate EntityDescriptor (%s) with role (%s), using last matching copy",
+ temp.get(), criteria.role->toString().c_str());
+ }
+ else if (criteria.artifact) {
+ m_log.warn("found duplicate EntityDescriptor for artifact source (%s) with role (%s), using last matching copy",
+ criteria.artifact->getSource().c_str(), criteria.role->toString().c_str());
+ }
+ }
+ held->unlock();
+ }