Changeset 3026 in ntrip for trunk/BNC/combination/cmbcaster.cpp


Ignore:
Timestamp:
Feb 24, 2011, 11:51:19 AM (14 years ago)
Author:
mervart
Message:
 
File:
1 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";
Note: See TracChangeset for help on using the changeset viewer.