Changeset 9730 in ntrip for trunk/BNC


Ignore:
Timestamp:
May 23, 2022, 10:11:47 PM (3 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

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

    r9729 r9730  
    234234  connect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
    235235
    236   if (_proxy) {
     236  if (!_proxy) {
     237    if (!connectToHost(_casterOutHost, _casterOutPort, _secure)) {
     238      return;
     239    }
     240  } else {
    237241    if (_ntripVersion == "1") {
    238242      emit(newMessage("No proxy support in Ntrip Version 1 upload!", true));
    239       delete _outSocket;
    240       _outSocket=0;
     243      _outSocket->close();
    241244      return;
    242245    }
     
    274277        if (!_outSocket->waitForEncrypted(timeOut)) {
    275278          emit(newMessage(
    276               "Proxy: Encrypt timeout for " + _mountpoint.toLatin1() + " ("
     279              "Proxy/Caster: Encrypt timeout for " + _mountpoint.toLatin1() + " ("
    277280                  + _casterOutHost.toLatin1() + ":"
    278281                  + QString("%1) ").arg(_casterOutPort).toLatin1()
     
    284287      }
    285288    }
    286   } else {
    287     if (!connectToHost(_casterOutHost, _casterOutPort, _secure)) {
    288       return;
    289     }
    290289  }
    291290
     
    306305  _outSocket->waitForReadyRead();
    307306
    308   QByteArray ans = _outSocket->readLine();  cout << "ans: " << ans.toStdString().c_str() << endl;
     307   QByteArray ans = "";
     308  if (_outSocket->canReadLine()) {
     309    ans = _outSocket->readLine();  cout << "ans: " << ans.toStdString().c_str() << endl;
     310  }
    309311
    310312  if (ans.indexOf("200") == -1) {
     
    333335              + QString("%1) ").arg(outPort).toLatin1()
    334336              + _outSocket->errorString().toLatin1(), true));
    335       //delete _outSocket;
    336       //_outSocket=0;
    337337      return false;
    338338    } else {
     
    347347              + QString("%1) ").arg(outPort).toLatin1()
    348348              + _outSocket->errorString().toLatin1(), true));
    349       //delete _outSocket;
    350       //_outSocket=0;
    351349      return false;
    352350    }
Note: See TracChangeset for help on using the changeset viewer.