You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by mc...@apache.org on 2004/04/22 22:44:38 UTC

cvs commit: logging-log4cxx/src hierarchy.cpp

mcatan      2004/04/22 13:44:38

  Modified:    src      hierarchy.cpp
  Log:
  fixed multithreading problem
  
  Revision  Changes    Path
  1.10      +7 -1      logging-log4cxx/src/hierarchy.cpp
  
  Index: hierarchy.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/hierarchy.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- hierarchy.cpp	28 Feb 2004 15:07:50 -0000	1.9
  +++ hierarchy.cpp	22 Apr 2004 20:44:38 -0000	1.10
  @@ -93,10 +93,16 @@
   {
   	mapCs.lock();
   	
  +	LoggerPtr logger;
   	LoggerMap::iterator it = loggers.find(name);
  -	return (it != loggers.end()) ? it->second : 0;
  +	if (it != loggers.end())
  +	{
  +		logger = it->second;
  +	}
   
   	mapCs.unlock();
  +	
  +	return logger;
   }
   	
   void Hierarchy::setThreshold(const LevelPtr& l)