Changeset 9743 in ntrip for trunk


Ignore:
Timestamp:
May 31, 2022, 10:23:38 PM (2 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncuploadcaster.cpp

    r9742 r9743  
    248248          + "Host: " + _casterOutHost.toLatin1() + "\r\n"
    249249          + "User-Agent: NTRIP BNC/" BNCVERSION " (" + BNC_OS + ")\r\n"
    250           + "\r\n";      //cout << msg.toStdString().c_str();
     250          + "\r\n";
    251251      _outSocket->write(msg);
    252252      _outSocket->waitForBytesWritten();
    253253      _outSocket->waitForReadyRead();
    254254
    255       QByteArray ans = _outSocket->readAll();      //cout << ans.toStdString().c_str() << endl;
     255      QByteArray ans = _outSocket->readAll();
    256256      if (ans.indexOf("200") == -1) {
    257         emit(newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1()
    258                         + ": " + ans.left(ans.length() - 2), true));
     257        int l = ans.indexOf("\r\n", 0);
     258        emit(newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1() + ": "  + ans.left(l-1), true));
    259259        _outSocket->close();
    260260        return;
     
    293293  _outSocket->waitForReadyRead();
    294294
    295    QByteArray ans = _outSocket->readAll();  //cout << "ans: " << ans.toStdString().c_str() << endl;
     295   QByteArray ans = _outSocket->readAll();
    296296
    297297  if (ans.indexOf("200") == -1) {
    298298    _outSocket->close();
    299     emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1() + ": "
    300                     + ans.left(ans.length() - 2), true));
     299    int l = ans.indexOf("\r\n", 0);
     300    emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1() + ": " + ans.left(l-1), true));
    301301  } else {
    302302    emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1(), true));
Note: See TracChangeset for help on using the changeset viewer.