Changeset 192 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Sep 24, 2006, 10:57:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r190 r192 21 21 22 22 #include "bncgetthread.h" 23 #include "bnctabledlg.h" 23 24 24 25 #include "RTCM/RTCM.h" … … 123 124 QString line = _socket->readLine(); 124 125 if (line.indexOf("Unauthorized") != -1) { 125 emit(newMessage((_staID + ": Caster Response:\n" + line).toAscii())); 126 exit(1); 127 return failure; 126 QStringList table; 127 bncTableDlg::getFullTable(_mountPoint.host(), _mountPoint.port(), table); 128 QString net; 129 QStringListIterator it(table); 130 while (it.hasNext()) { 131 QString line = it.next(); 132 if (line.indexOf("STR") == 0) { 133 QStringList tags = line.split(";"); 134 if (tags.at(1) == _staID) { 135 net = tags.at(7); 136 break; 137 } 138 } 139 } 140 141 QString reg; 142 it.toFront(); 143 while (it.hasNext()) { 144 QString line = it.next(); 145 if (line.indexOf("NET") == 0) { 146 QStringList tags = line.split(";"); 147 if (tags.at(1) == net) { 148 reg = tags.at(7); 149 break; 150 } 151 } 152 } 153 emit(newMessage((_staID + ": Caster Response:\n" + line + 154 "\nAdjust User-ID and Password Register through\n" + 155 reg).toAscii())); 156 return fatal; 128 157 } 129 158 if (line.indexOf("ICY 200 OK") != 0) { … … 164 193 void bncGetThread::run() { 165 194 166 if ( initRun() != success ) { 195 if (initRun() == fatal) { 196 QThread::exit(1); 197 return; 198 } 199 else if ( initRun() != success ) { 167 200 emit(newMessage(_staID + ": initRun failed, reconnecting")); 168 201 tryReconnect();
Note:
See TracChangeset
for help on using the changeset viewer.