Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11047)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11057)
@@ -71,27 +71,28 @@
   _out = 0;
 
+  Qt::ConnectionType conType = BNC_CORE->decoderConnectionType();
   connect(this, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
-          BNC_CORE, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
+          BNC_CORE, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)), conType);
 
   connect(this, SIGNAL(newClkCorrections(QList<t_clkCorr>)),
-          BNC_CORE, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
+          BNC_CORE, SLOT(slotNewClkCorrections(QList<t_clkCorr>)), conType);
 
   connect(this, SIGNAL(newCodeBiases(QList<t_satCodeBias>)),
-          BNC_CORE, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
+          BNC_CORE, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)), conType);
 
   connect(this, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)),
-          BNC_CORE, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
+          BNC_CORE, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)), conType);
 
   connect(this, SIGNAL(newTec(t_vTec)),
-          BNC_CORE, SLOT(slotNewTec(t_vTec)));
+          BNC_CORE, SLOT(slotNewTec(t_vTec)), conType);
 
   connect(this, SIGNAL(newMetaData(t_metaData)),
-          BNC_CORE, SLOT(slotNewMetaData(t_metaData)));
+          BNC_CORE, SLOT(slotNewMetaData(t_metaData)), conType);
 
   connect(this, SIGNAL(newSatAntennas(QList<t_satAntenna>)),
-          BNC_CORE, SLOT(slotNewSatAntennas(QList<t_satAntenna>)));
+          BNC_CORE, SLOT(slotNewSatAntennas(QList<t_satAntenna>)), conType);
 
   connect(this, SIGNAL(providerIDChanged(QString)),
-          BNC_CORE, SIGNAL(providerIDChanged(QString)));
+          BNC_CORE, SIGNAL(providerIDChanged(QString)), conType);
 
   connect(this, SIGNAL(newMessage(QByteArray,bool)),
@@ -784,8 +785,15 @@
   // Dump all older epochs
   // ---------------------
+  dumpEpochs(false);
+}
+
+// Emit and write the collected corrections of all epochs older than
+// _lastTime (all epochs if all is set, e.g. at the end of a replay)
+////////////////////////////////////////////////////////////////////////////
+void RTCM3coDecoder::dumpEpochs(bool all) {
   QMutableMapIterator<bncTime, QList<t_orbCorr> > itOrb(_orbCorrections);
   while (itOrb.hasNext()) {
     itOrb.next();
-    if (itOrb.key() < _lastTime) {
+    if (all || itOrb.key() < _lastTime) {
       emit newOrbCorrections(itOrb.value());
       t_orbCorr::writeEpoch(_out, itOrb.value());
@@ -796,5 +804,5 @@
   while (itClk.hasNext()) {
     itClk.next();
-    if (itClk.key() < _lastTime) {
+    if (all || itClk.key() < _lastTime) {
       emit newClkCorrections(itClk.value());
       t_clkCorr::writeEpoch(_out, itClk.value());
@@ -805,5 +813,5 @@
   while (itCB.hasNext()) {
     itCB.next();
-    if (itCB.key() < _lastTime) {
+    if (all || itCB.key() < _lastTime) {
       emit newCodeBiases(itCB.value());
       t_satCodeBias::writeEpoch(_out, itCB.value());
@@ -814,5 +822,5 @@
   while (itPB.hasNext()) {
     itPB.next();
-    if (itPB.key() < _lastTime) {
+    if (all || itPB.key() < _lastTime) {
       emit newPhaseBiases(itPB.value());
       t_satPhaseBias::writeEpoch(_out, itPB.value());
@@ -823,5 +831,5 @@
   while (itTec.hasNext()) {
     itTec.next();
-    if (itTec.key() < _lastTime) {
+    if (all || itTec.key() < _lastTime) {
       emit newTec(itTec.value());
       t_vTec::write(_out, itTec.value());
@@ -832,5 +840,5 @@
   while (itMD.hasNext()) {
     itMD.next();
-    if (itMD.key() < _lastTime) {
+    if (all || itMD.key() < _lastTime) {
       emit newMetaData(itMD.value());
       t_metaData::write(_out, itMD.value());
@@ -841,9 +849,12 @@
   while (itAnt.hasNext()) {
     itAnt.next();
-    if (itAnt.key() < _lastTime) {
+    if (all || itAnt.key() < _lastTime) {
       emit newSatAntennas(itAnt.value());
       t_satAntenna::writeEpoch(_out, itAnt.value());
       itAnt.remove();
     }
+  }
+  if (all && _out) {
+    _out->flush();
   }
 }
@@ -1126,7 +1137,7 @@
   else if (epoSecGlo != -1) {
     QDate date = dateAndTimeFromGPSweek(currentTime.gpsw(), currentTime.gpssec()).date();
-    if (_type == IGSssr) {
-      epoSecGlo = epoSecGlo + gnumleap(date.year(), date.month(), date.day());
-    }
+    // IGS-SSR: the SSR Epoch Time (IDF003, 20 bit) is given in one continuous
+    // time scale for all GNSS, i.e. GPS seconds of week also for GLONASS
+    // (IGS SSR v1.00) - no conversion
     if (_type == RTCMssr || _type == RTCMnewssr) {
       // Same GLONASS epoch wire convention (UTC+3h) as RTCMssr
@@ -1145,7 +1156,10 @@
   }
   else if (epoSecBds != -1) {
-    epoSecBds += 14.0;
-    if (epoSecBds > 604800.0) {
-      epoSecBds -= 7.0*24.0*60.0*60.0;
+    // RTCM-SSR: BDT; IGS-SSR: GPS time scale for all GNSS (IDF003)
+    if (_type != IGSssr) {
+      epoSecBds += 14.0;
+      if (epoSecBds > 604800.0) {
+        epoSecBds -= 7.0*24.0*60.0*60.0;
+      }
     }
     _lastTime.set(currentWeek, epoSecBds);
