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


Ignore:
Timestamp:
Oct 18, 2006, 3:41:58 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r250 r255  
    3636  _mountPoint = mountPoint;
    3737  _staID      = mountPoint.path().mid(1).toAscii();
     38  _staID_orig = _staID;
    3839  _format     = format;
    3940  _socket     = 0;
    4041  _timeOut    = 20*1000;  // 20 seconds
    4142  _nextSleep  =  1;       //  1 second
     43
     44  // Check name conflict
     45  // -------------------
     46  QSettings settings;
     47  QListIterator<QString> it(settings.value("mountPoints").toStringList());
     48  int num = 0;
     49  int ind = 0;
     50  while (it.hasNext()) {
     51    QStringList hlp = it.next().split(" ");
     52    if (hlp.size() <= 1) continue;
     53    QUrl url(hlp[0]);
     54    if (_mountPoint.path() == url.path()) {
     55      ++num;
     56      if (_mountPoint.host() == url.host()) {
     57        ind = num - 1;
     58      }
     59    }
     60  }
     61  if (num > 1) {
     62    _staID = _staID.left(_staID.length()-1) + QString("%1").arg(ind).toAscii();
     63  }   
    4264}
    4365
     
    143165        if (line.indexOf("STR") == 0) {
    144166          QStringList tags = line.split(";");
    145           if (tags.at(1) == _staID) {
     167          if (tags.at(1) == _staID_orig) {
    146168            net = tags.at(7);
    147169            break;
Note: See TracChangeset for help on using the changeset viewer.