~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/scheduling.cc

  • Committer: Brian Aker
  • Date: 2009-01-24 16:48:34 UTC
  • Revision ID: brian@gir-3.local-20090124164834-vcctf70tytgk0e4y
Fix for making sure I_S has good information about which plugins are
actually active.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    has_been_seen= true;
39
39
  }
40
40
 
 
41
  assert(plugin->plugin->init); /* Find poorly designed plugins */
41
42
  if (plugin->plugin->init)
42
43
  {
43
44
 
75
76
    scheduler_inited= true;
76
77
    /* We populate so we can find which plugin was initialized later on */
77
78
    plugin->data= (void *)&thread_scheduler;
 
79
    plugin->state= PLUGIN_IS_READY;
78
80
  }
79
81
 
80
82
  return 0;
87
89
int scheduling_finalizer(st_plugin_int *plugin)
88
90
{
89
91
  /* We know which one we initialized since its data pointer is filled */
90
 
  if (plugin->plugin->deinit && plugin->data)
 
92
  if (plugin->plugin->deinit && plugin->state == PLUGIN_IS_READY)
91
93
  {
92
94
    if (plugin->plugin->deinit((void *)&thread_scheduler))
93
95
    {