~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/errmsg.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:
20
20
#include <drizzled/server_includes.h>
21
21
#include <drizzled/errmsg.h>
22
22
#include <drizzled/gettext.h>
 
23
#include "drizzled/plugin_registry.h"
 
24
 
23
25
#include <vector>
24
26
 
25
27
using namespace std;
28
30
 
29
31
static bool errmsg_has= false;
30
32
 
31
 
static void add_errmsg_handler(Error_message_handler *handler)
 
33
void add_errmsg_handler(Error_message_handler *handler)
32
34
{
33
35
  all_errmsg_handler.push_back(handler);
34
36
}
35
37
 
36
 
static void remove_errmsg_handler(Error_message_handler *handler)
 
38
void remove_errmsg_handler(Error_message_handler *handler)
37
39
{
38
40
  all_errmsg_handler.erase(find(all_errmsg_handler.begin(),
39
41
                                all_errmsg_handler.end(), handler));
59
61
    }
60
62
  }
61
63
 
62
 
  add_errmsg_handler(p);
 
64
  Plugin_registry &registry= Plugin_registry::get_plugin_registry();
 
65
  if (p != NULL)
 
66
    registry.registerPlugin(p);
63
67
  plugin->data= p;
64
68
  errmsg_has= true;
65
69