~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin_registry_impl.cc

  • Committer: Brian Aker
  • Date: 2009-03-27 00:14:08 UTC
  • mto: This revision was merged to the branch mainline in revision 967.
  • Revision ID: brian@tangent.org-20090327001408-n6uxtfiymazy1pgf
Refactor plugin loading to remove mask (one step closer to getting rid of
malloc!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
}
64
64
 
65
65
 
66
 
void Plugin_registry_impl::get_mask_list(uint32_t type,
67
 
                                         vector<st_plugin_int *> &plugins,
68
 
                                         uint32_t state_mask)
 
66
void Plugin_registry_impl::get_list(uint32_t type,
 
67
                                    vector<st_plugin_int *> &plugins,
 
68
                                    bool active)
69
69
{
70
70
  st_plugin_int *plugin= NULL;
71
71
  plugins.reserve(plugin_map[type].size());
76
76
       map_iter++)
77
77
  {
78
78
    plugin= (*map_iter).second;
79
 
    plugins.push_back(!(plugin->state & state_mask) ? plugin : NULL);
 
79
    if (active)
 
80
      plugins.push_back(plugin);
 
81
    else if (plugin->isInited)
 
82
      plugins.push_back(plugin);
80
83
  }
81
84
}