Changeset 11185 in ntrip for trunk/BNC/src/upload
- Timestamp:
- Nov 9, 2026, 12:15:48 PM (21 hours ago)
- Location:
- trunk/BNC/src/upload
- Files:
-
- 3 edited
-
bncrtnetuploadcaster.cpp (modified) (4 diffs)
-
bncuploadcaster.cpp (modified) (8 diffs)
-
bncuploadcaster.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r11179 r11185 330 330 331 331 if (lines.size() < 2) { 332 emit(newMessage( 333 "bncRtnetUploadCaster: less than 2 lines to decode " + _casterID.toLatin1(), false)); 332 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncRtnetUploadCaster: less than 2 lines to decode " + _casterID.toLatin1()), false); 334 333 return; 335 334 } … … 354 353 epoTime.set(year, month, day, hour, min, sec); 355 354 356 emit(newMessage( 357 "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str()) 355 emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str()) 358 356 + " " + QByteArray(epoTime.timestr().c_str()) + " " 359 + _casterID.toLatin1() , false));357 + _casterID.toLatin1()), false); 360 358 361 359 struct SsrCorr::ClockOrbit co; … … 697 695 in >> dummy; 698 696 } 699 emit (newMessage(" RTNET format error: "700 + lines[ii].toLatin1() , false));697 emit newLogRecord(t_logRecord::message(t_logRecord::error, " RTNET format error: " 698 + lines[ii].toLatin1()), false); 701 699 break; 702 700 } … … 1180 1178 1181 1179 if (corrIsOutOfRange(sd)) { 1182 emit (newMessage(QString("bncRtnetUploadCaster: SSR parameter is out of its defined range").toLatin1(), false));1180 emit newLogRecord(t_logRecord::message(t_logRecord::warning, QString("bncRtnetUploadCaster: SSR parameter is out of its defined range").toLatin1()), false); 1183 1181 return failure; 1184 1182 } -
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; -
trunk/BNC/src/upload/bncuploadcaster.h
r11060 r11185 10 10 #include <QSslKey> 11 11 #include <iostream> 12 #include "bnclog.h" 12 13 13 14 … … 39 40 signals: 40 41 void newMessage(const QByteArray msg, bool showOnScreen); 42 void newLogRecord(t_logRecord rec, bool showOnScreen); 41 43 void newBytes(QByteArray staID, double nbyte); 42 44
Note:
See TracChangeset
for help on using the changeset viewer.
