Index: trunk/BNC/corrfile.cpp
===================================================================
--- trunk/BNC/corrfile.cpp	(revision 3689)
+++ trunk/BNC/corrfile.cpp	(revision 3690)
@@ -66,4 +66,48 @@
 void t_corrFile::syncRead(const bncTime& tt) {
 
+  QList<QString> corrs;
 
+  if (!_lastLine.isEmpty() && !stopRead(tt)) {
+    corrs << _lastLine;
+  }
+
+  while (_stream->status() == QTextStream::Ok && !_stream->atEnd()) {
+    QString line = _stream->readLine();
+    if (line.isEmpty() || line[0] == '!') {
+      continue;
+    }
+    _lastLine = line;
+
+    if (stopRead(tt)) {
+      if (corrs.size()) {
+        emit newCorrections(corrs);
+      }
+    }
+    else {
+      corrs << _lastLine;
+    }
+  }
 }
+
+// Read till a given time
+////////////////////////////////////////////////////////////////////////////
+bool t_corrFile::stopRead(const bncTime& tt) {
+
+  if (_lastLine.isEmpty()) {
+    return false;
+  }
+
+  QTextStream in(_lastLine.toAscii(), QIODevice::ReadOnly);
+  int    messageType, updateInterval, GPSweek;
+  double GPSweeks;
+  in >> messageType >> updateInterval >> GPSweek >> GPSweeks;
+
+  bncTime tNew(GPSweek, GPSweeks);
+
+  if (tNew >= tt) {
+    return true;
+  }    
+  else {
+    return false;
+  }
+}
Index: trunk/BNC/corrfile.h
===================================================================
--- trunk/BNC/corrfile.h	(revision 3689)
+++ trunk/BNC/corrfile.h	(revision 3690)
@@ -42,6 +42,8 @@
 
  private:
-  QFile*         _file;
-  QTextStream*   _stream;
+  bool stopRead(const bncTime& tt);
+  QFile*       _file;
+  QTextStream* _stream;
+  QString      _lastLine;
 };
 
