~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/registry.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-22 21:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2348.
  • Revision ID: olafvdspek@gmail.com-20110622215714-0wmhwrx6of27etov
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
      }
138
138
      if (not found_dep)
139
139
      {
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());
 
140
        errmsg_printf(error::ERROR, _("Couldn't process plugin module dependencies. %s depends on %s but %s is not to be loaded.\n"),
 
141
          handle->getName().c_str(), dep_str.c_str(), dep_str.c_str());
145
142
        DRIZZLE_ABORT;
146
143
      }
147
144
    }
164
161
  return plugins;
165
162
}
166
163
 
167
 
module::Library *module::Registry::addLibrary(const std::string &plugin_name,
168
 
                                              bool builtin)
 
164
module::Library *module::Registry::addLibrary(const std::string &plugin_name, bool builtin)
169
165
{
170
 
 
171
166
  /* If this dll is already loaded just return it */
172
167
  module::Library *library= findLibrary(plugin_name);
173
168
  if (library)
187
182
  LibraryMap::iterator iter= library_registry_.find(plugin_name);
188
183
  if (iter != library_registry_.end())
189
184
  {
 
185
    delete iter->second;
190
186
    library_registry_.erase(iter);
191
 
    delete iter->second;
192
187
  }
193
188
}
194
189