Changeset 1502 in ntrip for trunk/BNC/bncnetqueryv1.cpp


Ignore:
Timestamp:
Jan 19, 2009, 11:14:02 AM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryv1.cpp

    r1500 r1502  
    154154  // Read Caster Response
    155155  // --------------------
     156  QStringList response;
    156157  while (true) {
    157158    if (!_socket->waitForReadyRead(_timeOut)) {
     
    164165    if (_socket->canReadLine()) {
    165166      QString line = _socket->readLine();
     167      response.push_back(line);
     168      if (line.trimmed().isEmpty()) {
     169        break;
     170      }
    166171      if (line.indexOf("ICY 200 OK") != -1) {
     172        response.clear();
    167173        break;
    168174      }
    169175    }
    170176  }
     177  if (response.size() > 0) {
     178    delete _socket;
     179    _socket = 0;
     180    _status = error;
     181    emit newMessage(_url.path().toAscii() + " wrong caster response\n" +
     182                    response.join("\n").toAscii(), true);
     183  }
    171184}
    172185
Note: See TracChangeset for help on using the changeset viewer.