Changeset 8231 in ntrip for trunk/BNC/src/bncnetqueryrtp.cpp


Ignore:
Timestamp:
Jan 4, 2018, 10:23:05 AM (6 years ago)
Author:
wiese
Message:

CHANGE: #105 QT5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncnetqueryrtp.cpp

    r8203 r8231  
    1111 * Created:    27-Dec-2008
    1212 *
    13  * Changes:   
     13 * Changes:
    1414 *
    1515 * -----------------------------------------------------------------------*/
     
    4141}
    4242
    43 // 
     43//
    4444////////////////////////////////////////////////////////////////////////////
    4545void bncNetQueryRtp::stop() {
     
    5555}
    5656
    57 // 
     57//
    5858////////////////////////////////////////////////////////////////////////////
    5959void bncNetQueryRtp::slotKeepAlive() {
     
    6868}
    6969
    70 // 
     70//
    7171////////////////////////////////////////////////////////////////////////////
    7272void bncNetQueryRtp::waitForRequestResult(const QUrl&, QByteArray&) {
    7373}
    7474
    75 // 
     75//
    7676////////////////////////////////////////////////////////////////////////////
    7777void bncNetQueryRtp::waitForReadyRead(QByteArray& outData) {
     
    115115  QString proxyHost = settings.value("proxyHost").toString();
    116116  int     proxyPort = settings.value("proxyPort").toInt();
    117  
     117
    118118  if ( proxyHost.isEmpty() ) {
    119119    _socket->connectToHost(_url.host(), _url.port());
     
    129129    QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1());
    130130    QByteArray userAndPwd;
    131    
     131
    132132    if(!uName.isEmpty() || !passW.isEmpty()) {
    133133      userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" +
     
    157157
    158158    _socket->write(reqStr, reqStr.length());
    159    
     159
    160160    // Read Server Answer 1
    161161    // --------------------
     
    175175          line = in.readLine();
    176176        }
    177    
     177
    178178        // Send Request 2
    179179        // --------------
    180         if (!_session.isEmpty()) { 
     180        if (!_session.isEmpty()) {
    181181
    182182          // Send initial RTP packet for firewall handling
     
    198198            rtpbuffer[11] = (sessInt      ) & 0xFF;
    199199
    200             _udpSocket->writeDatagram(rtpbuffer, 12, 
     200            _udpSocket->writeDatagram(rtpbuffer, 12,
    201201                              _socket->peerAddress(), serverPort.toInt());
    202202          }
     
    207207                 + "\r\n";
    208208          _socket->write(reqStr, reqStr.length());
    209    
     209
    210210          // Read Server Answer 2
    211211          // --------------------
     
    216216              while (!line.isEmpty()) {
    217217                if (line.indexOf("200 OK") != -1) {
    218                   emit newMessage(_url.encodedPath().replace(0,1,"")
     218                  emit newMessage(_url.toEncoded().replace(0,1,"")
    219219                            + ": UDP connection established", true);
    220220                  slotKeepAlive();
     
    233233  _socket = 0;
    234234  _status = error;
    235   emit newMessage(_url.encodedPath().replace(0,1,"")
     235  emit newMessage(_url.toEncoded().replace(0,1,"")
    236236                  + ": NetQuery, waiting for connect", true);
    237237}
Note: See TracChangeset for help on using the changeset viewer.