Changeset 11185 in ntrip for trunk/BNC/src/upload/bncuploadcaster.cpp
- Timestamp:
- Nov 9, 2026, 12:15:48 PM (12 hours ago)
- File:
-
- 1 edited
-
trunk/BNC/src/upload/bncuploadcaster.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncuploadcaster.cpp
r11153 r11185 63 63 _isToBeDeleted = false; 64 64 65 connect(this, SIGNAL(newMessage(QByteArray,bool)), BNC_CORE, SLOT(slotMessage(const QByteArray,bool))); 65 BNC_CORE->connectMessages(this, "upload"); 66 BNC_CORE->connectLogRecords(this, "upload"); 66 67 67 68 if (BNC_CORE->_uploadTableItems.find(_iRow) != BNC_CORE->_uploadTableItems.end()) { … … 95 96 // no fallback to Ntrip Version 2: user name and password would be sent 96 97 // unencrypted although an encrypted connection was configured 97 emit (newMessage(_mountpoint.toLatin1() + "@" + _casterOutHost.toLatin1() +98 ": No SSL support, please install OpenSSL run-time libraries: no upload" , true));98 emit newLogRecord(t_logRecord::message(t_logRecord::error, _mountpoint.toLatin1() + "@" + _casterOutHost.toLatin1() + 99 ": No SSL support, please install OpenSSL run-time libraries: no upload"), true); 99 100 } else { 100 101 _secure = true; … … 137 138 void bncUploadCaster::slotProxyAuthenticationRequired(const QNetworkProxy&, 138 139 QAuthenticator*) { 139 emit new Message("slotProxyAuthenticationRequired", true);140 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "slotProxyAuthenticationRequired"), true); 140 141 } 141 142 … … 171 172 msg += " (ignored as configured)"; 172 173 } 173 emit (newMessage(_mountpoint.toLatin1() + "@" + _casterOutHost.toLatin1() + ": " + msg.toLatin1(), true));174 emit newLogRecord(t_logRecord::message((_sslIgnoreErrors ? t_logRecord::warning : t_logRecord::error), _mountpoint.toLatin1() + "@" + _casterOutHost.toLatin1() + ": " + msg.toLatin1()), true); 174 175 } 175 176 } … … 274 275 } else { 275 276 if (_ntripVersion == "1") { 276 emit (newMessage("No proxy support in Ntrip Version 1 upload!", true));277 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "No proxy support in Ntrip Version 1 upload!"), true); 277 278 delete _outSocket; _outSocket = 0; 278 279 return; … … 299 300 if (!statusOk(ans)) { 300 301 int l = ans.indexOf("\r\n", 0); 301 emit (newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1() + "@" +302 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() + ": " + ans.left(l) , true));302 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "Proxy: Connection broken for " + _mountpoint.toLatin1() + "@" + 303 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() + ": " + ans.left(l)), true); 303 304 delete _outSocket; _outSocket = 0; 304 305 return; 305 306 } else { 306 emit (newMessage("Proxy: Connection established for " + _mountpoint.toLatin1()+ "@" +307 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() , true));307 emit newLogRecord(t_logRecord::message(t_logRecord::info, "Proxy: Connection established for " + _mountpoint.toLatin1()+ "@" + 308 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1()), true); 308 309 _sOpenTrial = 0; 309 310 _outSocket->setPeerVerifyName(_casterOutHost); 310 311 _outSocket->startClientEncryption(); 311 312 if (!_outSocket->waitForEncrypted(timeOut)) { 312 emit (newMessage("Proxy/Caster: Encrypt timeout for " + _mountpoint.toLatin1() + "@"313 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "Proxy/Caster: Encrypt timeout for " + _mountpoint.toLatin1() + "@" 313 314 + _casterOutHost.toLatin1() + ":" 314 315 + QString("%1) ").arg(_casterOutPort).toLatin1() 315 + _outSocket->errorString().toLatin1() , true));316 + _outSocket->errorString().toLatin1()), true); 316 317 delete _outSocket; _outSocket = 0; 317 318 return; 318 319 } else { 319 emit (newMessage("Proxy: SSL handshake completed for " + _mountpoint.toLatin1() + "@" +320 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() , true));320 emit newLogRecord(t_logRecord::message(t_logRecord::info, "Proxy: SSL handshake completed for " + _mountpoint.toLatin1() + "@" + 321 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1()), true); 321 322 } 322 323 } … … 347 348 delete _outSocket; _outSocket = 0; 348 349 int l = ans.indexOf("\r\n", 0); 349 emit (newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1() + "@" +350 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "Broadcaster: Connection broken for " + _mountpoint.toLatin1() + "@" + 350 351 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() + 351 ": " + ans.left(l) , true));352 } else { 353 emit (newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1() + "@" +354 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() , true));352 ": " + ans.left(l)), true); 353 } else { 354 emit newLogRecord(t_logRecord::message(t_logRecord::info, "Broadcaster: Connection opened for " + _mountpoint.toLatin1() + "@" + 355 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1()), true); 355 356 _sOpenTrial = 0; 356 357 } … … 364 365 _outSocket->connectToHostEncrypted(outHost, outPort); 365 366 if (!_outSocket->waitForEncrypted(timeOut)) { 366 emit(newMessage( 367 "Broadcaster: Connect timeout for " + _mountpoint.toLatin1() + "@" 367 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "Broadcaster: Connect timeout for " + _mountpoint.toLatin1() + "@" 368 368 + outHost.toLatin1() + ":" 369 369 + QString("%1) ").arg(outPort).toLatin1() 370 + _outSocket->errorString().toLatin1() , true));370 + _outSocket->errorString().toLatin1()), true); 371 371 delete _outSocket; _outSocket = 0; 372 372 return false; 373 373 } else { 374 emit (newMessage("Broadcaster: SSL handshake completed for " + _mountpoint.toLatin1() + "@" +375 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1() , true));374 emit newLogRecord(t_logRecord::message(t_logRecord::info, "Broadcaster: SSL handshake completed for " + _mountpoint.toLatin1() + "@" + 375 _casterOutHost.toLatin1() + ":" + QString("%1").arg(_casterOutPort).toLatin1()), true); 376 376 } 377 377 } else { 378 378 _outSocket->connectToHost(outHost, outPort); 379 379 if (!_outSocket->waitForConnected(timeOut)) { 380 emit (newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1() + "@"380 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "Broadcaster: Connect timeout for " + _mountpoint.toLatin1() + "@" 381 381 + outHost.toLatin1() + ":" 382 382 + QString("%1) ").arg(outPort).toLatin1() 383 + _outSocket->errorString().toLatin1() , true));383 + _outSocket->errorString().toLatin1()), true); 384 384 delete _outSocket; _outSocket = 0; 385 385 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
