Index: /trunk/BNC/bncgetthread.cpp
===================================================================
--- /trunk/BNC/bncgetthread.cpp	(revision 1345)
+++ /trunk/BNC/bncgetthread.cpp	(revision 1346)
@@ -301,119 +301,4 @@
 }
 
-#define AGENTVERSION "1.7"
-// Connect to Caster, send the Request (static)
-////////////////////////////////////////////////////////////////////////////
-bncSocket* bncGetThread::request(const QUrl& mountPoint,
-                                 QByteArray& latitude, QByteArray& longitude,
-                                 QByteArray& nmea, int timeOut, 
-                                 QString& msg) {
-
-  // Connect the Socket
-  // ------------------
-  QSettings settings;
-  QString proxyHost = settings.value("proxyHost").toString();
-  int     proxyPort = settings.value("proxyPort").toInt();
- 
-  bncSocket* socket = new bncSocket(new QTcpSocket());
-  if ( proxyHost.isEmpty() ) {
-    socket->connectToHost(mountPoint.host(), mountPoint.port());
-  }
-  else {
-    socket->connectToHost(proxyHost, proxyPort);
-  }
-  if (!socket->waitForConnected(timeOut)) {
-    msg += "Connect timeout\n";
-    delete socket;
-    return 0;
-  }
-
-  // Send Request
-  // ------------
-  QString uName = QUrl::fromPercentEncoding(mountPoint.userName().toAscii());
-  QString passW = QUrl::fromPercentEncoding(mountPoint.password().toAscii());
-  QByteArray userAndPwd;
-
-  if(!uName.isEmpty() || !passW.isEmpty())
-  {
-    userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
-    passW.toAscii()).toBase64() + "\r\n";
-  }
-
-  QUrl hlp;
-  hlp.setScheme("http");
-  hlp.setHost(mountPoint.host());
-  hlp.setPort(mountPoint.port());
-  hlp.setPath(mountPoint.path());
-
-  QByteArray reqStr;
-  if ( proxyHost.isEmpty() ) {
-    if (hlp.path().indexOf("/") != 0) hlp.setPath("/");
-    reqStr = "GET " + hlp.path().toAscii() + " HTTP/1.0\r\n"
-             + "User-Agent: NTRIP BNC/" AGENTVERSION "\r\n"
-             + userAndPwd + "\r\n";
-  } else {
-    reqStr = "GET " + hlp.toEncoded() + " HTTP/1.0\r\n"
-             + "User-Agent: NTRIP BNC/" AGENTVERSION "\r\n"
-             + "Host: " + hlp.host().toAscii() + "\r\n"
-             + userAndPwd + "\r\n";
-  }
-
-  // NMEA string to handle VRS stream
-  // --------------------------------
-  double lat, lon;
-
-  lat = strtod(latitude,NULL);
-  lon = strtod(longitude,NULL);
-
-  if ((nmea == "yes") && (hlp.path().length() > 2) && (hlp.path().indexOf(".skl") < 0)) {
-    const char* flagN="N";
-    const char* flagE="E";
-    if (lon >180.) {lon=(lon-360.)*(-1.); flagE="W";}
-    if ((lon < 0.) && (lon >= -180.))  {lon=lon*(-1.); flagE="W";}
-    if (lon < -180.)  {lon=(lon+360.); flagE="E";}
-    if (lat < 0.)  {lat=lat*(-1.); flagN="S";}
-    QTime ttime(QDateTime::currentDateTime().toUTC().time());
-    int lat_deg = (int)lat;  
-    double lat_min=(lat-lat_deg)*60.;
-    int lon_deg = (int)lon;  
-    double lon_min=(lon-lon_deg)*60.;
-    int hh = 0 , mm = 0;
-    double ss = 0.0;
-    hh=ttime.hour();
-    mm=ttime.minute();
-    ss=(double)ttime.second()+0.001*ttime.msec();
-    QString gga;
-    gga += "GPGGA,";
-    gga += QString("%1%2%3,").arg((int)hh, 2, 10, QLatin1Char('0')).arg((int)mm, 2, 10, QLatin1Char('0')).arg((int)ss, 2, 10, QLatin1Char('0'));
-    gga += QString("%1%2,").arg((int)lat_deg,2, 10, QLatin1Char('0')).arg(lat_min, 7, 'f', 4, QLatin1Char('0'));
-    gga += flagN;
-    gga += QString(",%1%2,").arg((int)lon_deg,3, 10, QLatin1Char('0')).arg(lon_min, 7, 'f', 4, QLatin1Char('0'));
-    gga += flagE + QString(",1,05,1.00,+00100,M,10.000,M,,");
-    int xori;
-    char XOR = 0;
-    char *Buff =gga.toAscii().data();
-    int iLen = strlen(Buff);
-    for (xori = 0; xori < iLen; xori++) {
-      XOR ^= (char)Buff[xori];
-    }
-    gga += QString("*%1").arg(XOR, 2, 16, QLatin1Char('0'));
-    reqStr += "$";
-    reqStr += gga;
-    reqStr += "\r\n";
-  }
-
-  msg += reqStr;
-
-  socket->write(reqStr, reqStr.length());
-
-  if (!socket->waitForBytesWritten(timeOut)) {
-    msg += "Write timeout\n";
-    delete socket;
-    return 0;
-  }
-
-  return socket;
-}
-
 // Init Run
 ////////////////////////////////////////////////////////////////////////////
@@ -425,6 +310,6 @@
     // -----------------
     QString msg;
-    _socket = this->request(_mountPoint, _latitude, _longitude, 
-                            _nmea, _timeOut, msg);
+    _socket = bncSocket::request(_mountPoint, _latitude, _longitude, 
+                                 _nmea, _timeOut, msg);
     if (!_socket) {
       return failure;
Index: /trunk/BNC/bncgetthread.h
===================================================================
--- /trunk/BNC/bncgetthread.h	(revision 1345)
+++ /trunk/BNC/bncgetthread.h	(revision 1346)
@@ -51,7 +51,4 @@
 
    ~bncGetThread();
-
-   static bncSocket* request(const QUrl& mountPoint, QByteArray& latitude, QByteArray& longitude,
-                             QByteArray& nmea, int timeOut, QString& msg);
 
    QByteArray staID() const {return _staID;}
Index: /trunk/BNC/bncrinex.cpp
===================================================================
--- /trunk/BNC/bncrinex.cpp	(revision 1345)
+++ /trunk/BNC/bncrinex.cpp	(revision 1346)
@@ -157,5 +157,5 @@
     QByteArray _longitude;
     QByteArray _nmea;
-    bncSocket* socket = bncGetThread::request(url, _latitude, _longitude, _nmea, timeOut, msg);
+    bncSocket* socket = bncSocket::request(url, _latitude, _longitude, _nmea, timeOut, msg);
 
     if (socket) {
Index: /trunk/BNC/bncsocket.cpp
===================================================================
--- /trunk/BNC/bncsocket.cpp	(revision 1345)
+++ /trunk/BNC/bncsocket.cpp	(revision 1346)
@@ -22,4 +22,6 @@
 using namespace std;
 
+#define BNCVERSION "1.7"
+
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
@@ -99,2 +101,117 @@
   return _socket->waitForBytesWritten(msecs);
 }
+
+// Connect to Caster, send the Request (static)
+////////////////////////////////////////////////////////////////////////////
+bncSocket* bncSocket::request(const QUrl& mountPoint,
+                              QByteArray& latitude, QByteArray& longitude,
+                              QByteArray& nmea, int timeOut, 
+                              QString& msg) {
+
+  // Connect the Socket
+  // ------------------
+  QSettings settings;
+  QString proxyHost = settings.value("proxyHost").toString();
+  int     proxyPort = settings.value("proxyPort").toInt();
+ 
+  bncSocket* socket = new bncSocket(new QTcpSocket());
+  if ( proxyHost.isEmpty() ) {
+    socket->connectToHost(mountPoint.host(), mountPoint.port());
+  }
+  else {
+    socket->connectToHost(proxyHost, proxyPort);
+  }
+  if (!socket->waitForConnected(timeOut)) {
+    msg += "Connect timeout\n";
+    delete socket;
+    return 0;
+  }
+
+  // Send Request
+  // ------------
+  QString uName = QUrl::fromPercentEncoding(mountPoint.userName().toAscii());
+  QString passW = QUrl::fromPercentEncoding(mountPoint.password().toAscii());
+  QByteArray userAndPwd;
+
+  if(!uName.isEmpty() || !passW.isEmpty())
+  {
+    userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
+    passW.toAscii()).toBase64() + "\r\n";
+  }
+
+  QUrl hlp;
+  hlp.setScheme("http");
+  hlp.setHost(mountPoint.host());
+  hlp.setPort(mountPoint.port());
+  hlp.setPath(mountPoint.path());
+
+  QByteArray reqStr;
+  if ( proxyHost.isEmpty() ) {
+    if (hlp.path().indexOf("/") != 0) hlp.setPath("/");
+    reqStr = "GET " + hlp.path().toAscii() + " HTTP/1.0\r\n"
+             + "User-Agent: NTRIP BNC/" BNCVERSION "\r\n"
+             + userAndPwd + "\r\n";
+  } else {
+    reqStr = "GET " + hlp.toEncoded() + " HTTP/1.0\r\n"
+             + "User-Agent: NTRIP BNC/" BNCVERSION "\r\n"
+             + "Host: " + hlp.host().toAscii() + "\r\n"
+             + userAndPwd + "\r\n";
+  }
+
+  // NMEA string to handle VRS stream
+  // --------------------------------
+  double lat, lon;
+
+  lat = strtod(latitude,NULL);
+  lon = strtod(longitude,NULL);
+
+  if ((nmea == "yes") && (hlp.path().length() > 2) && (hlp.path().indexOf(".skl") < 0)) {
+    const char* flagN="N";
+    const char* flagE="E";
+    if (lon >180.) {lon=(lon-360.)*(-1.); flagE="W";}
+    if ((lon < 0.) && (lon >= -180.))  {lon=lon*(-1.); flagE="W";}
+    if (lon < -180.)  {lon=(lon+360.); flagE="E";}
+    if (lat < 0.)  {lat=lat*(-1.); flagN="S";}
+    QTime ttime(QDateTime::currentDateTime().toUTC().time());
+    int lat_deg = (int)lat;  
+    double lat_min=(lat-lat_deg)*60.;
+    int lon_deg = (int)lon;  
+    double lon_min=(lon-lon_deg)*60.;
+    int hh = 0 , mm = 0;
+    double ss = 0.0;
+    hh=ttime.hour();
+    mm=ttime.minute();
+    ss=(double)ttime.second()+0.001*ttime.msec();
+    QString gga;
+    gga += "GPGGA,";
+    gga += QString("%1%2%3,").arg((int)hh, 2, 10, QLatin1Char('0')).arg((int)mm, 2, 10, QLatin1Char('0')).arg((int)ss, 2, 10, QLatin1Char('0'));
+    gga += QString("%1%2,").arg((int)lat_deg,2, 10, QLatin1Char('0')).arg(lat_min, 7, 'f', 4, QLatin1Char('0'));
+    gga += flagN;
+    gga += QString(",%1%2,").arg((int)lon_deg,3, 10, QLatin1Char('0')).arg(lon_min, 7, 'f', 4, QLatin1Char('0'));
+    gga += flagE + QString(",1,05,1.00,+00100,M,10.000,M,,");
+    int xori;
+    char XOR = 0;
+    char *Buff =gga.toAscii().data();
+    int iLen = strlen(Buff);
+    for (xori = 0; xori < iLen; xori++) {
+      XOR ^= (char)Buff[xori];
+    }
+    gga += QString("*%1").arg(XOR, 2, 16, QLatin1Char('0'));
+    reqStr += "$";
+    reqStr += gga;
+    reqStr += "\r\n";
+  }
+
+  msg += reqStr;
+
+  socket->write(reqStr, reqStr.length());
+
+  if (!socket->waitForBytesWritten(timeOut)) {
+    msg += "Write timeout\n";
+    delete socket;
+    return 0;
+  }
+
+  return socket;
+}
+
Index: /trunk/BNC/bncsocket.h
===================================================================
--- /trunk/BNC/bncsocket.h	(revision 1345)
+++ /trunk/BNC/bncsocket.h	(revision 1346)
@@ -23,4 +23,9 @@
   QAbstractSocket::SocketState state() const;
 
+ static bncSocket* request(const QUrl& mountPoint, QByteArray& latitude, 
+                           QByteArray& longitude, QByteArray& nmea, 
+                           int timeOut, QString& msg);
+
+
  private:
   QTcpSocket* _socket;
Index: /trunk/BNC/bnctabledlg.cpp
===================================================================
--- /trunk/BNC/bnctabledlg.cpp	(revision 1345)
+++ /trunk/BNC/bnctabledlg.cpp	(revision 1346)
@@ -163,5 +163,5 @@
   QByteArray _longitude;
   QByteArray _nmea;
-  bncSocket* socket = bncGetThread::request(url, _latitude, _longitude, _nmea, timeOut, msg);
+  bncSocket* socket = bncSocket::request(url, _latitude, _longitude, _nmea, timeOut, msg);
 
   if (!socket) {
Index: /trunk/BNC/serial/posix_qextserialport.cpp
===================================================================
--- /trunk/BNC/serial/posix_qextserialport.cpp	(revision 1345)
+++ /trunk/BNC/serial/posix_qextserialport.cpp	(revision 1346)
@@ -822,7 +822,7 @@
         /*open the port*/
         Posix_File->setFileName(port);
-        qDebug("Trying to open File");
+        ////        qDebug("Trying to open File");
         if (Posix_File->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
-            qDebug("Opened File succesfully");
+          ///            qDebug("Opened File succesfully");
             /*set open mode*/
             QIODevice::open(mode);
