- Timestamp:
- Nov 12, 2006, 4:44:10 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r292 r298 40 40 * -----------------------------------------------------------------------*/ 41 41 42 #include <iostream.h> 43 42 44 #include <stdlib.h> 43 45 … … 55 57 #include "bncutils.h" 56 58 #include "bncconst.h" 59 #include "bnctabledlg.h" 57 60 #include "RTCM3/rtcm3torinex.h" 58 61 … … 97 100 if (_headerLines.last().indexOf("END OF HEADER") != -1) { 98 101 break; 102 } 103 } 104 } 105 106 // Try to download the skeleton file 107 // --------------------------------- 108 else { 109 QStringList table; 110 bncTableDlg::getFullTable(_mountPoint.host(), _mountPoint.port(), 111 table, false); 112 QString net; 113 QStringListIterator it(table); 114 while (it.hasNext()) { 115 QString line = it.next(); 116 if (line.indexOf("STR") == 0) { 117 QStringList tags = line.split(";"); 118 if (tags.at(1) == _mountPoint.path().mid(1).toAscii()) { 119 net = tags.at(7); 120 break; 121 } 122 } 123 } 124 QString sklDir; 125 it.toFront(); 126 while (it.hasNext()) { 127 QString line = it.next(); 128 if (line.indexOf("NET") == 0) { 129 QStringList tags = line.split(";"); 130 if (tags.at(1) == net) { 131 sklDir = tags.at(6); 132 cout << _mountPoint.path().mid(1).toAscii().data() << " " 133 << sklDir.toAscii().data() << endl; 134 break; 135 } 99 136 } 100 137 } -
trunk/BNC/bnctabledlg.cpp
r280 r298 119 119 //////////////////////////////////////////////////////////////////////////// 120 120 t_irc bncTableDlg::getFullTable(const QString& casterHost, 121 int casterPort, QStringList& allLines) { 121 int casterPort, QStringList& allLines, 122 bool alwaysRead) { 123 124 static QMap<QString, QStringList> allTables; 125 126 if (!alwaysRead && allTables.find(casterHost) != allTables.end()) { 127 allLines = allTables.find(casterHost).value(); 128 return success; 129 } 122 130 123 131 allLines.clear(); … … 168 176 delete socket; 169 177 178 allTables.insert(casterHost, allLines); 170 179 return success; 171 180 }
Note:
See TracChangeset
for help on using the changeset viewer.