~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/authentication.cc

  • Committer: Monty Taylor
  • Date: 2009-04-10 21:13:45 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410211345-8ti3nt2i2otjrjly
New-style plugin registration now works.
New-style plugin re-registration on the way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
}
78
78
 
79
79
 
80
 
int authentication_initializer(st_plugin_int *plugin)
81
 
{
82
 
  Authentication *authen= NULL;
83
 
 
84
 
  if (plugin->plugin->init)
85
 
  {
86
 
    if (plugin->plugin->init(&authen))
87
 
    {
88
 
      errmsg_printf(ERRMSG_LVL_ERROR,
89
 
                    _("Plugin '%s' init function returned error."),
90
 
                    plugin->name.str);
91
 
      return 1;
92
 
    }
93
 
  }
94
 
 
95
 
  if (authen == NULL)
96
 
    return 1;
97
 
 
98
 
  Plugin_registry &registry= Plugin_registry::get_plugin_registry();
99
 
  registry.registerPlugin(authen);
100
 
  plugin->data= authen;
101
 
  are_plugins_loaded= true;
102
 
 
103
 
  return 0;
104
 
}
105
 
 
106
80
int authentication_finalizer(st_plugin_int *plugin)
107
81
{
108
82
  Authentication *authen= static_cast<Authentication *>(plugin->data);