Changeset 9712 in ntrip for trunk


Ignore:
Timestamp:
May 6, 2022, 10:28:46 PM (3 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

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

    r9707 r9712  
    198198  }
    199199
    200   if (_outSocket != 0 &&
    201       _outSocket->state() == QAbstractSocket::ConnectedState) {
    202     return;
    203   }
    204  
     200  if (_outSocket != 0) {
     201    if (_outSocket->state() == QAbstractSocket::ConnectedState) {
     202      return;
     203    }
     204    else {
     205      cout << "open(): outSocketState: " << _outSocket->state() << endl;
     206      emit(newMessage("Broadcaster: No connection for " + _mountpoint.toLatin1(), true));
     207    }
     208  }
     209
    205210  delete _outSocket; _outSocket = 0;
    206211
     
    222227  }
    223228  _outSocket->setProxy(QNetworkProxy::NoProxy); // to prevent the usage of system entries
    224   if (_ntripVersion == "1") {
    225     _outHost = _casterOutHost;
    226     _outPort = _casterOutPort;
    227   }
    228   else {
    229     if (!_proxyHost.isEmpty()) {
    230       _outHost = _proxyHost;
    231       _outPort = _proxyPort;
    232       connect(_outSocket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)),
    233               this, SLOT(slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
    234     }
     229  _outHost = _casterOutHost;
     230  _outPort = _casterOutPort;
     231  if (!_proxyHost.isEmpty()) {
     232    _outHost = _proxyHost;
     233    _outPort = _proxyPort;
     234    connect(_outSocket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)),
     235            this, SLOT(slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
    235236  }
    236237
     
    239240  }
    240241  else {
    241     _outSocket->connectToHostEncrypted(_outHost, _outPort);/*
     242    _outSocket->connectToHostEncrypted(_outHost, _outPort);
    242243    if (!_outSocket->waitForEncrypted()) {
    243244        cout << "waitForEncrypted: " << _outSocket->errorString().toStdString().c_str() << endl;;
    244245        return;
    245     }*/
     246    }
    246247  }
    247248
     
    283284  }
    284285  else {
    285     emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1(), true));
     286    emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1() + ": " + ans.left(ans.length()-2), true));
    286287    _sOpenTrial = 0;
    287288  }
Note: See TracChangeset for help on using the changeset viewer.