]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/NavDataCache.cxx
Fix some CommStation bugs
[flightgear.git] / src / Navaids / NavDataCache.cxx
index e073f863f1b0f478ecb8683297d5f217e668f642..5974aae584a5f3aaa72705510e64250564914da3 100644 (file)
@@ -646,7 +646,7 @@ public:
     int range = sqlite3_column_int(loadCommStation, 0);
     int freqKhz = sqlite3_column_int(loadCommStation, 1);
     
-    CommStation* c = new CommStation(rowId, id, ty, pos, freqKhz, range);
+    CommStation* c = new CommStation(rowId, name, ty, pos, freqKhz, range);
     c->setAirport(airport);
     return c;
   }
@@ -929,10 +929,10 @@ NavDataCache::NavDataCache()
     // reached this point with no exception, success
       break;
     } catch (sg_exception& e) {
-      SG_LOG(SG_NAVCACHE, SG_WARN, "NavCache: init failed:" << e.what()
+      SG_LOG(SG_NAVCACHE, t == 0 ? SG_WARN : SG_ALERT, "NavCache: init failed:" << e.what()
              << " (attempt " << t << ")");
-      homePath.remove();
       d.reset();
+      homePath.remove();
     }
   } // of retry loop