Changeset 6088 in ntrip for trunk/BNC/src/PPP_free


Ignore:
Timestamp:
Sep 7, 2014, 6:58:24 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_free/pppClient.cpp

    r6087 r6088  
    5454// Global variable holding thread-specific pointers
    5555//////////////////////////////////////////////////////////////////////////////
    56 t_pppClient* PPP_CLIENT = 0;
     56QThreadStorage<t_pppClient*> CLIENTS;
    5757
    5858// Static function returning thread-specific pointer
    5959//////////////////////////////////////////////////////////////////////////////
    6060t_pppClient* t_pppClient::instance() {
    61   return PPP_CLIENT;
     61  return CLIENTS.localData();
    6262}
    6363
     
    7171  _log       = new ostringstream();
    7272  _staID     = QByteArray(_opt->_roverName.c_str());
    73   PPP_CLIENT = this;
     73
     74  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7475}
    7576
Note: See TracChangeset for help on using the changeset viewer.