Changeset 278 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Nov 8, 2006, 11:58:57 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r277 r278 34 34 // Constructor 35 35 //////////////////////////////////////////////////////////////////////////// 36 bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format) { 36 bncGetThread::bncGetThread(const QUrl& mountPoint, 37 const QByteArray& format, int iMount) { 37 38 _decoder = 0; 38 39 _mountPoint = mountPoint; … … 43 44 _timeOut = 20*1000; // 20 seconds 44 45 _nextSleep = 1; // 1 second 46 _iMount = iMount; // index in mountpoints array 45 47 46 48 // Check name conflict … … 49 51 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 50 52 int num = 0; 51 int ind = 0;53 int ind = -1; 52 54 while (it.hasNext()) { 55 ++ind; 53 56 QStringList hlp = it.next().split(" "); 54 57 if (hlp.size() <= 1) continue; 55 58 QUrl url(hlp[0]); 56 59 if (_mountPoint.path() == url.path()) { 57 ++num;58 if (_mountPoint.host() == url.host()) {59 ind = num - 1;60 61 62 } 63 if (num > 1) {64 _staID = _staID.left(_staID.length()-1) + QString("%1").arg( ind).toAscii();60 if (_iMount > ind) { 61 ++num; 62 } 63 } 64 } 65 66 if (num > 0) { 67 _staID = _staID.left(_staID.length()-1) + QString("%1").arg(num).toAscii(); 65 68 } 66 69 }
Note:
See TracChangeset
for help on using the changeset viewer.