Changeset 2810 in ntrip for trunk/BNC/bncpppclient.cpp


Ignore:
Timestamp:
Dec 18, 2010, 12:41:52 PM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpppclient.cpp

    r2809 r2810  
    632632void bncPPPclient::processEpochs() {
    633633
     634  // Synchronization threshold (not used in SPP mode)
     635  // ------------------------------------------------
    634636  double maxDt = 0.0;
    635637  if (!_pppMode) {
     
    637639  }
    638640
     641  // Make sure the buffer does not grow beyond any limit
     642  // ---------------------------------------------------
     643  const unsigned MAX_EPODATA_SIZE = 120;
     644  if (_epoData.size() > MAX_EPODATA_SIZE) {
     645    delete _epoData.front();
     646    _epoData.pop();
     647  }
     648
     649  // Loop over all unprocessed epochs
     650  // --------------------------------
    639651  while (!_epoData.empty()) {
     652
    640653    t_epoData* frontEpoData = _epoData.front();
    641654
     
    643656    // ----------------------------------
    644657    if (maxDt != 0.0 && !_corr_tt.valid()) {
    645       delete _epoData.front();
    646       _epoData.pop();
    647       continue;
    648     }
    649 
    650     if (maxDt == 0 ||
    651          (frontEpoData->tt - _corr_tt) < maxDt ) {
     658      return;
     659    }
     660
     661    // Process the front epoch
     662    // -----------------------
     663    if (maxDt == 0 || frontEpoData->tt - _corr_tt < maxDt) {
    652664      processFrontEpoch();
    653665      delete _epoData.front();
Note: See TracChangeset for help on using the changeset viewer.