(file) Return to Executor.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Executor.cpp between version 1.4 and 1.5

version 1.4, 2007/06/05 11:14:41 version 1.5, 2007/06/06 19:51:53
Line 1002 
Line 1002 
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
 static int _executorSock = -1; static int _executorSock = -1;
 static ExecutorImpl* _executorImpl = 0;  static AutoPtr<ExecutorImpl> _executorImpl;
 static Mutex _executorMutex; static Mutex _executorMutex;
  
 static ExecutorImpl* _getImpl() static ExecutorImpl* _getImpl()
Line 1010 
Line 1010 
     // Use the double-checked locking technique to avoid the overhead of a lock     // Use the double-checked locking technique to avoid the overhead of a lock
     // on every call.     // on every call.
  
     if (_executorImpl == 0)      if (_executorImpl.get() == 0)
     {     {
         AutoMutex autoMutex(_executorMutex);         AutoMutex autoMutex(_executorMutex);
  
         if (_executorImpl == 0)          if (_executorImpl.get() == 0)
         {         {
 #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION) #if defined(PEGASUS_ENABLE_PRIVILEGE_SEPARATION)
             if (_executorSock == -1)             if (_executorSock == -1)
                 _executorImpl = new ExecutorLoopbackImpl();                  _executorImpl.reset(new ExecutorLoopbackImpl());
             else             else
                 _executorImpl = new ExecutorSocketImpl(_executorSock);                  _executorImpl.reset(new ExecutorSocketImpl(_executorSock));
 #else #else
             _executorImpl = new ExecutorLoopbackImpl();              _executorImpl.reset(new ExecutorLoopbackImpl());
 #endif #endif
         }         }
     }     }
  
     return _executorImpl;      return _executorImpl.get();
 } }
  
 void Executor::setSock(int sock) void Executor::setSock(int sock)


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2