Index: /trunk/BNC/src/PPP/pppThread.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppThread.cpp	(revision 5730)
+++ /trunk/BNC/src/PPP/pppThread.cpp	(revision 5731)
@@ -28,5 +28,5 @@
  * -------------------------------------------------------------------------
  *
- * Class:      t_pppThread
+ * Class:      t_pppThread, t_pppRun
  *
  * Purpose:    Single PPP Client (running in its own thread)
@@ -60,4 +60,5 @@
 ////////////////////////////////////////////////////////////////////////////
 t_pppThread::~t_pppThread() {
+  delete _pppRun;
   cout << "~t_pppThread" << endl;
 }
@@ -69,6 +70,15 @@
   cout << _opt._roverName << " run" << endl;
 
-  // Connect to BNC Signals
-  // ----------------------
+  _pppRun = new t_pppRun(_opt);
+  QThread::exec();
+
+  cout << _opt._roverName << " exit" << endl;
+}
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+t_pppRun::t_pppRun(const t_options& opt) {
+  _opt = opt;
+
   if (BNC_CORE->caster()) {
     connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_obs>)),
@@ -87,15 +97,15 @@
             this, SLOT(slotNewCorrections(QList<QString>)));
   }
- 
-  // Start processing loop
-  // ---------------------
-  QThread::exec();
+}
 
-  cout << _opt._roverName << " exit" << endl;
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+t_pppRun::~t_pppRun() {
+  cout << "~t_pppRun" << endl;
 }
 
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_pppThread::slotNewEphGPS(gpsephemeris gpseph) {
+void t_pppRun::slotNewEphGPS(gpsephemeris gpseph) {
   QMutexLocker locker(&_mutex);
   cout << _opt._roverName << " slotNewEphGPS" << endl;
@@ -104,5 +114,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_pppThread::slotNewEphGlonass(glonassephemeris gloeph) {
+void t_pppRun::slotNewEphGlonass(glonassephemeris gloeph) {
   QMutexLocker locker(&_mutex);
   cout << _opt._roverName << " slotNewEphGlonass" << endl;
@@ -111,5 +121,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_pppThread::slotNewEphGalileo(galileoephemeris /* galeph */) {
+void t_pppRun::slotNewEphGalileo(galileoephemeris /* galeph */) {
   QMutexLocker locker(&_mutex);
   cout << _opt._roverName << " slotNewEphGalileo" << endl;
@@ -118,5 +128,5 @@
 // 
 ////////////////////////////////////////////////////////////////////////////
-void t_pppThread::slotNewCorrections(QList<QString> corrList) {
+void t_pppRun::slotNewCorrections(QList<QString> corrList) {
   QMutexLocker locker(&_mutex);
   cout << _opt._roverName << " slotNewCorrections" << endl;
@@ -124,5 +134,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppThread::slotNewObs(QByteArray staID, QList<t_obs> obsList) {
+void t_pppRun::slotNewObs(QByteArray staID, QList<t_obs> obsList) {
   QMutexLocker locker(&_mutex);
   cout << _opt._roverName << " slotNewObs" << endl;
Index: /trunk/BNC/src/PPP/pppThread.h
===================================================================
--- /trunk/BNC/src/PPP/pppThread.h	(revision 5730)
+++ /trunk/BNC/src/PPP/pppThread.h	(revision 5731)
@@ -10,11 +10,9 @@
 namespace BNC {
 
-class t_pppThread : public QThread {
+class t_pppRun : public QObject {
  Q_OBJECT
-
  public:
-  t_pppThread(const t_options* opt);
-  ~t_pppThread();
-  virtual void run();
+  t_pppRun(const t_options& opt);
+  ~t_pppRun();
 
  public slots:
@@ -30,4 +28,15 @@
 };
 
+class t_pppThread : public QThread {
+ public:
+  t_pppThread(const t_options* opt);
+  ~t_pppThread();
+  virtual void run();
+
+ private:
+  t_options _opt;
+  t_pppRun* _pppRun;
+};
+
 }
 
