Changeset 11128 in ntrip for trunk/BNC/src/upload/bncuploadcaster.cpp
- Timestamp:
- Oct 24, 2026, 11:37:52 PM (6 days ago)
- File:
-
- 1 edited
-
trunk/BNC/src/upload/bncuploadcaster.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncuploadcaster.cpp
r11126 r11128 24 24 25 25 using namespace std; 26 27 // Status line of the caster/proxy answer is "HTTP/1.x 200 ..." or "ICY 200 OK" 28 //////////////////////////////////////////////////////////////////////////// 29 static bool statusOk(const QByteArray& ans) { 30 QList<QByteArray> status = ans.left(ans.indexOf("\r\n")).split(' '); 31 return status.size() >= 2 && status[1] == "200" && 32 (status[0].startsWith("HTTP/") || status[0] == "ICY"); 33 } 26 34 27 35 // Constructor … … 284 292 285 293 QByteArray ans = _outSocket->readAll(); 286 if ( ans.indexOf("200") == -1) {294 if (!statusOk(ans)) { 287 295 int l = ans.indexOf("\r\n", 0); 288 296 emit(newMessage("Proxy: Connection broken for " + _mountpoint.toLatin1() + "@" + … … 331 339 QByteArray ans = _outSocket->readAll(); 332 340 333 if ( ans.indexOf("200") == -1) {341 if (!statusOk(ans)) { 334 342 delete _outSocket; _outSocket = 0; 335 343 int l = ans.indexOf("\r\n", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
