~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/loader.cc

  • Committer: Monty Taylor
  • Date: 2010-07-06 00:44:32 UTC
  • mfrom: (1643.1.13 build)
  • Revision ID: mordred@inaugust.com-20100706004432-843uftc92rc2497l
Merged in PBMS, translation updates, a few build fixes and a few bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1686
1686
    long_options.add(module_options);
1687
1687
 
1688
1688
  }
1689
 
  else
1690
 
  {
1691
 
 
1692
 
    for (opt= test_module->getManifest().system_vars; opt && *opt; opt++)
1693
 
    {
1694
 
      count++;
1695
 
    }
1696
 
 
1697
 
    if (count > EXTRA_OPTIONS || (*argc > 1))
1698
 
    {
1699
 
      if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count)))
1700
 
      {
1701
 
        errmsg_printf(ERRMSG_LVL_ERROR,
1702
 
                      _("Out of memory for plugin '%s'."),
1703
 
                      test_module->getName().c_str());
1704
 
        return(-1);
1705
 
      }
1706
 
      memset(opts, 0, sizeof(option) * count);
1707
 
 
1708
 
      if (construct_options(module_root, test_module, opts))
1709
 
      {
1710
 
        errmsg_printf(ERRMSG_LVL_ERROR,
1711
 
                      _("Bad options for plugin '%s'."),
1712
 
                      test_module->getName().c_str());
1713
 
        return(-1);
1714
 
      }
1715
 
 
 
1689
 
 
1690
  for (opt= test_module->getManifest().system_vars; opt && *opt; opt++)
 
1691
  {
 
1692
    count++;
 
1693
  }
 
1694
 
 
1695
  if (count > EXTRA_OPTIONS || (*argc > 1))
 
1696
  {
 
1697
    if (!(opts= (option*) module_root->alloc_root(sizeof(option) * count)))
 
1698
    {
 
1699
      errmsg_printf(ERRMSG_LVL_ERROR,
 
1700
                    _("Out of memory for plugin '%s'."),
 
1701
                    test_module->getName().c_str());
 
1702
      return(-1);
 
1703
    }
 
1704
    memset(opts, 0, sizeof(option) * count);
 
1705
 
 
1706
    if (construct_options(module_root, test_module, opts))
 
1707
    {
 
1708
      errmsg_printf(ERRMSG_LVL_ERROR,
 
1709
                    _("Bad options for plugin '%s'."),
 
1710
                    test_module->getName().c_str());
 
1711
      return(-1);
 
1712
    }
 
1713
 
 
1714
    if (test_module->getManifest().init_options == NULL)
 
1715
    {
1716
1716
      error= handle_options(argc, &argv, opts, get_one_plugin_option);
1717
1717
      (*argc)++; /* add back one for the program name */
1718
1718