Changeset 473 in ntrip


Ignore:
Timestamp:
Jun 18, 2007, 2:22:14 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r464 r473  
    256256  if (_socket->canReadLine()) {
    257257    QString line = _socket->readLine();
     258
     259    // Skip messages from proxy server
     260    // -------------------------------
     261    if (line.indexOf("ICY 200 OK") == -1 &&
     262        line.indexOf("200 OK")     != -1 ) {
     263      bool proxyRespond = true;
     264      while (true) {
     265        if (_socket->canReadLine()) {
     266          line = _socket->readLine();
     267          if (!proxyRespond) {
     268            break;
     269          }
     270          if (line.trimmed().isEmpty()) {
     271            proxyRespond = false;
     272          }
     273        }
     274        else {
     275          _socket->waitForReadyRead(_timeOut);
     276        }
     277      }
     278    }
     279
    258280    if (line.indexOf("Unauthorized") != -1) {
    259281      QStringList table;
  • trunk/BNC/bnctabledlg.cpp

    r464 r473  
    157157  // Read Caster Response
    158158  // --------------------
     159  bool proxyRespond = false;
    159160  bool first = true;
    160161  while (true) {
    161162    if (socket->canReadLine()) {
    162163      QString line = socket->readLine();
     164
     165      // Skip messages from proxy server
     166      // -------------------------------
     167      if (line.indexOf("SOURCETABLE 200 OK") == -1 &&
     168          line.indexOf("200 OK")             != -1 ) {
     169        proxyRespond = true;
     170      }
     171      if (proxyRespond) {
     172        if (line.trimmed().isEmpty()) {
     173          proxyRespond = false;
     174        }
     175        continue;
     176      }
     177
    163178      allLines.push_back(line);
    164179      if (first) {
Note: See TracChangeset for help on using the changeset viewer.