Browse Source

[2211] create the client lists map in the DataSrcClientsMgr ctor.

this will help corner case considerations of it being NULL
JINMEI Tatuya 12 years ago
parent
commit
adc18e7e10
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bin/auth/datasrc_clients_mgr.h

+ 6 - 0
src/bin/auth/datasrc_clients_mgr.h

@@ -84,6 +84,11 @@ typedef std::pair<CommandID, data::ConstElementPtr> Command;
 template <typename ThreadType, typename BuilderType, typename MutexType,
 template <typename ThreadType, typename BuilderType, typename MutexType,
           typename CondVarType>
           typename CondVarType>
 class DataSrcClientsMgrBase {
 class DataSrcClientsMgrBase {
+private:
+    typedef std::map<dns::RRClass,
+                     boost::shared_ptr<datasrc::ConfigurableClientList> >
+    ClientListsMap;
+
 public:
 public:
     /// \brief Constructor.
     /// \brief Constructor.
     ///
     ///
@@ -98,6 +103,7 @@ public:
     /// \throw std::bad_alloc internal memory allocation failure.
     /// \throw std::bad_alloc internal memory allocation failure.
     /// \throw isc::Unexpected general unexpected system errors.
     /// \throw isc::Unexpected general unexpected system errors.
     DataSrcClientsMgrBase() :
     DataSrcClientsMgrBase() :
+        clients_map_(new ClientListsMap),
         builder_(&command_queue_, &cond_, &queue_mutex_, &clients_map_,
         builder_(&command_queue_, &cond_, &queue_mutex_, &clients_map_,
                  &map_mutex_),
                  &map_mutex_),
         builder_thread_(boost::bind(&BuilderType::run, &builder_))
         builder_thread_(boost::bind(&BuilderType::run, &builder_))