Changeset 9842 in ntrip for trunk/BNC/src/upload
- Timestamp:
- Sep 28, 2022, 6:25:33 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r9841 r9842 265 265 266 266 267 / *Append to internal buffer267 // Append to internal buffer 268 268 // ------------------------- 269 269 _rtnetStreamBuffer.append(QByteArray(buffer, bufLen)); … … 308 308 "bncRtnetUploadCaster: less than 2 lines to decode " + _casterID.toLatin1(), false)); 309 309 return; 310 }311 */312 313 // Append to internal buffer314 // -------------------------315 _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));316 317 // Select buffer part that contains last epoch318 // -------------------------------------------319 QStringList lines;320 int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch321 if (iEpoBeg == -1) {322 _rtnetStreamBuffer.clear();323 return;324 }325 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);326 327 int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch328 if (iEpoEnd == -1) {329 return;330 }331 else {332 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);333 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd+3);334 }335 336 if (lines.size() < 2) {337 emit(newMessage(338 "bncRtnetUploadCaster: less than 2 lines to decode " + _casterID.toLatin1(), false));339 return;340 }341 342 // Keep the last unfinished line in buffer343 // ---------------------------------------344 int iLastEOL = _rtnetStreamBuffer.lastIndexOf('\n');345 if (iLastEOL != -1) {346 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastEOL+1);347 310 } 348 311
Note:
See TracChangeset
for help on using the changeset viewer.