~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/registry.cc

  • Committer: Mark Atwood
  • Date: 2011-06-24 11:45:17 UTC
  • mfrom: (2318.6.64 rf)
  • Revision ID: me@mark.atwood.name-20110624114517-1mq8no6jlp2nrg7m
mergeĀ lp:~olafvdspek/drizzle/refactor15

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
module::Registry::~Registry()
53
53
{
54
 
  plugin::Plugin::map::iterator plugin_iter;
55
 
 
56
54
  /* Give all plugins a chance to cleanup, before
57
55
   * all plugins are deleted.
58
56
   * This can be used if shutdown code references
137
135
      }
138
136
      if (not found_dep)
139
137
      {
140
 
        errmsg_printf(error::ERROR,
141
 
                      _("Couldn't process plugin module dependencies. "
142
 
                        "%s depends on %s but %s is not to be loaded.\n"),
143
 
                      handle->getName().c_str(),
144
 
                      dep_str.c_str(), dep_str.c_str());
 
138
        errmsg_printf(error::ERROR, _("Couldn't process plugin module dependencies. %s depends on %s but %s is not to be loaded.\n"),
 
139
          handle->getName().c_str(), dep_str.c_str(), dep_str.c_str());
145
140
        DRIZZLE_ABORT;
146
141
      }
147
142
    }
164
159
  return plugins;
165
160
}
166
161
 
167
 
module::Library *module::Registry::addLibrary(const std::string &plugin_name,
168
 
                                              bool builtin)
 
162
module::Library *module::Registry::addLibrary(const std::string &plugin_name, bool builtin)
169
163
{
170
 
 
171
164
  /* If this dll is already loaded just return it */
172
165
  module::Library *library= findLibrary(plugin_name);
173
166
  if (library)
187
180
  LibraryMap::iterator iter= library_registry_.find(plugin_name);
188
181
  if (iter != library_registry_.end())
189
182
  {
 
183
    delete iter->second;
190
184
    library_registry_.erase(iter);
191
 
    delete iter->second;
192
185
  }
193
186
}
194
187