From aba57077fd690e7386913d311b789b53e5dae237 Mon Sep 17 00:00:00 2001
From: Durk Talsma <durk@linux-iue5.site>
Date: Fri, 3 Sep 2010 12:32:55 +0200
Subject: [PATCH] Issue a warning when finding duplicate tail numbers. Note
 that this is far from a fatal error, but does interfere with the startup
 heuristics data collection mechanism.

---
 src/Traffic/TrafficMgr.cxx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx
index 5e649472c..f25516a26 100644
--- a/src/Traffic/TrafficMgr.cxx
+++ b/src/Traffic/TrafficMgr.cxx
@@ -200,6 +200,11 @@ void FGTrafficManager::init()
                     data >> h.registration >> h.runCount >> h.hits;
                     if (data.eof())
                         break;
+                    HeuristicMapIterator itr = heurMap.find(h.registration);
+                    if (itr != heurMap.end()) {
+                         SG_LOG(SG_GENERAL, SG_WARN,"Traffic Manager Warning: found duplicate tailnumber " << 
+                         h.registration << " for AI aircraft");
+                    }
                     heurMap[h.registration] = h;
                     heuristics.push_back(h);
                 }