Changeset 8709 in ntrip for trunk/BNC/src/bncephuser.cpp


Ignore:
Timestamp:
Apr 29, 2019, 3:32:31 PM (5 years ago)
Author:
stuerze
Message:

minor changes to prevent crashes in case of GLONASS upload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncephuser.cpp

    r8702 r8709  
    120120  }
    121121
    122   checkEphemeris(eph, realTime);
    123 
    124122  const t_ephGPS*     ephGPS     = dynamic_cast<const t_ephGPS*>(eph);
    125123  const t_ephGlo*     ephGlo     = dynamic_cast<const t_ephGlo*>(eph);
     
    159157  }
    160158
    161   if ((ephOld == 0 || newEph->isNewerThan(ephOld)) &&
    162       (eph->checkState() != t_eph::bad &&
    163        eph->checkState() != t_eph::outdated)) {
     159  if (ephOld == 0 || newEph->isNewerThan(ephOld)) {
     160    checkEphemeris(eph, realTime);
     161  }
     162  else {
     163    delete newEph;
     164    return failure;
     165  }
     166
     167  if (eph->checkState() != t_eph::bad &&
     168       eph->checkState() != t_eph::outdated) {
    164169    deque<t_eph*>& qq = _eph[prn];
    165170    qq.push_back(newEph);
Note: See TracChangeset for help on using the changeset viewer.