Changeset 3026 in ntrip


Ignore:
Timestamp:
Feb 24, 2011, 11:51:19 AM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/combination
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/combination/cmbcaster.cpp

    r2990 r3026  
    2828  bncSettings settings;
    2929  _mountpoint = settings.value("cmbMountpoint").toString();
     30  _cmbOutHost = settings.value("cmbOutHost").toString();
     31  _cmbOutPort = settings.value("cmbOutPort").toInt();
     32  _password   = settings.value("cmbPassword").toString();
    3033  _outSocket  = 0;
    3134  _sOpenTrial = 0;
     
    4447void cmbCaster::open() {
    4548
    46   if (_mountpoint.isEmpty()) {
     49  if (_cmbOutHost.isEmpty()) {
    4750    return;
    4851  }
     
    6770  }
    6871
    69   bncSettings settings;
    7072  _outSocket = new QTcpSocket();
    71   QString password;
    72   _outSocket->connectToHost(settings.value("cmbOutHost").toString(),
    73                             settings.value("cmbOutPort").toInt());
    74   password = settings.value("cmbPassword").toString();
     73  _outSocket->connectToHost(_cmbOutHost, _cmbOutPort);
    7574
    7675  const int timeOut = 5000;  // 5 seconds
     
    7877    delete _outSocket;
    7978    _outSocket = 0;
    80     emit(newMessage("Broadcaster: Connect timeout", true));
     79    emit(newMessage("cmbcaster:: Broadcaster: Connect timeout", true));
    8180    return;
    8281  }
    8382
    84   QByteArray msg = "SOURCE " + password.toAscii() + " /" +
     83  QByteArray msg = "SOURCE " + _password.toAscii() + " /" +
    8584                   _mountpoint.toAscii() + "\r\n" +
    8685                   "Source-Agent: NTRIP BNC/" BNCVERSION "\r\n\r\n";
  • trunk/BNC/combination/cmbcaster.h

    r3025 r3026  
    1919 private:
    2020  QString      _mountpoint;
     21  QString      _cmbOutHost;
     22  int          _cmbOutPort;
     23  QString      _password;
    2124  QTcpSocket*  _outSocket;
    2225  int          _sOpenTrial;
Note: See TracChangeset for help on using the changeset viewer.