~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/authentication.cc

  • Committer: Monty Taylor
  • Date: 2009-04-10 18:17:59 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410181759-wr58on1xxc9lwzut
Made plugin registration go through Plugin_registry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <drizzled/server_includes.h>
22
 
#include <drizzled/authentication.h>
23
 
#include <drizzled/gettext.h>
24
 
#include <drizzled/errmsg_print.h>
 
21
#include "drizzled/server_includes.h"
 
22
#include "drizzled/authentication.h"
 
23
#include "drizzled/gettext.h"
 
24
#include "drizzled/errmsg_print.h"
 
25
#include "drizzled/plugin_registry.h"
25
26
 
26
27
#include <vector>
27
28
 
31
32
 
32
33
static bool are_plugins_loaded= false;
33
34
 
34
 
static void add_authentication(Authentication *auth)
 
35
void add_authentication(Authentication *auth)
35
36
{
36
37
  all_authentication.push_back(auth);
37
38
}
38
39
 
39
 
static void remove_authentication(Authentication *auth)
 
40
void remove_authentication(Authentication *auth)
40
41
{
41
42
  all_authentication.erase(find(all_authentication.begin(),
42
43
                                all_authentication.end(),
94
95
  if (authen == NULL)
95
96
    return 1;
96
97
 
97
 
  add_authentication(authen);
 
98
  Plugin_registry &registry= Plugin_registry::get_plugin_registry();
 
99
  registry.registerPlugin(authen);
98
100
  plugin->data= authen;
99
101
  are_plugins_loaded= true;
100
102