Changeset 278 in ntrip for trunk/BNC/bncgetthread.cpp


Ignore:
Timestamp:
Nov 8, 2006, 11:58:57 AM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r277 r278  
    3434// Constructor
    3535////////////////////////////////////////////////////////////////////////////
    36 bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format) {
     36bncGetThread::bncGetThread(const QUrl& mountPoint,
     37                           const QByteArray& format, int iMount) {
    3738  _decoder    = 0;
    3839  _mountPoint = mountPoint;
     
    4344  _timeOut    = 20*1000;  // 20 seconds
    4445  _nextSleep  =  1;       //  1 second
     46  _iMount     = iMount;   // index in mountpoints array
    4547
    4648  // Check name conflict
     
    4951  QListIterator<QString> it(settings.value("mountPoints").toStringList());
    5052  int num = 0;
    51   int ind = 0;
     53  int ind = -1;
    5254  while (it.hasNext()) {
     55    ++ind;
    5356    QStringList hlp = it.next().split(" ");
    5457    if (hlp.size() <= 1) continue;
    5558    QUrl url(hlp[0]);
    5659    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();
    6568  }   
    6669}
Note: See TracChangeset for help on using the changeset viewer.