Changeset 3026 in ntrip for trunk/BNC/combination/cmbcaster.cpp
- Timestamp:
- Feb 24, 2011, 11:51:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/cmbcaster.cpp
r2990 r3026 28 28 bncSettings settings; 29 29 _mountpoint = settings.value("cmbMountpoint").toString(); 30 _cmbOutHost = settings.value("cmbOutHost").toString(); 31 _cmbOutPort = settings.value("cmbOutPort").toInt(); 32 _password = settings.value("cmbPassword").toString(); 30 33 _outSocket = 0; 31 34 _sOpenTrial = 0; … … 44 47 void cmbCaster::open() { 45 48 46 if (_ mountpoint.isEmpty()) {49 if (_cmbOutHost.isEmpty()) { 47 50 return; 48 51 } … … 67 70 } 68 71 69 bncSettings settings;70 72 _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); 75 74 76 75 const int timeOut = 5000; // 5 seconds … … 78 77 delete _outSocket; 79 78 _outSocket = 0; 80 emit(newMessage(" Broadcaster: Connect timeout", true));79 emit(newMessage("cmbcaster:: Broadcaster: Connect timeout", true)); 81 80 return; 82 81 } 83 82 84 QByteArray msg = "SOURCE " + password.toAscii() + " /" +83 QByteArray msg = "SOURCE " + _password.toAscii() + " /" + 85 84 _mountpoint.toAscii() + "\r\n" + 86 85 "Source-Agent: NTRIP BNC/" BNCVERSION "\r\n\r\n";
Note:
See TracChangeset
for help on using the changeset viewer.