src/dird/dir_plugins.c
void load_dir_plugins(const char *plugin_dir)
{
   Plugin *plugin;
   int i;

   Dmsg0(dbglvl, "Load Director plugins\n");
   if (!plugin_dir) {
      Dmsg0(dbglvl, "No Director plugin directory!\n");
      return;
   }
   b_plugin_list = New(alist(10, not_owned_by_alist));
   if (!load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type,
                is_plugin_compatible)) {
      /* Either none found, or some error */
      if (b_plugin_list->size() == 0) {
         delete b_plugin_list;
         b_plugin_list = NULL;
         Dmsg0(dbglvl, "No plugins loaded\n");
         return;
      }
   }
   /*
    * Verify that the plugin is acceptable, and print information
    *  about it.
    */
   foreach_alist_index(i, plugin, b_plugin_list) {
      Jmsg(NULL, M_INFO, 0, _("Loaded plugin: %s\n"), plugin->file);
      Dmsg1(dbglvl, "Loaded plugin: %s\n", plugin->file);
   }

   Dmsg1(dbglvl, "num plugins=%d\n", b_plugin_list->size());
   dbg_plugin_add_hook(dump_dir_plugin);
}
/**
 * This entry point is called internally by Bacula to ensure
 *  that the plugin IO calls come into this code.
 */
This entry point is called internally by Bacula to ensure
that the plugin IO calls come into this code.
This entry point is called internally by Bacula to ensure that the plugin IO calls come into this code .
void load_dir_plugins(const char *plugin_dir)
{
   Plugin *plugin;
   int i;
   Dmsg0(dbglvl, "Load Director plugins\n");
   if (!plugin_dir) {
      Dmsg0(dbglvl, "No Director plugin directory!\n");
      return;
   }
   b_plugin_list = New(alist(10, not_owned_by_alist));
   if (!load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type,
                is_plugin_compatible)) {
      if (b_plugin_list->size() == 0) {
         delete b_plugin_list;
         b_plugin_list = NULL;
         Dmsg0(dbglvl, "No plugins loaded\n");
         return;
      }
   }
   foreach_alist_index(i, plugin, b_plugin_list) {
      Jmsg(NULL, M_INFO, 0, _("Loaded plugin: %s\n"), plugin->file);
      Dmsg1(dbglvl, "Loaded plugin: %s\n", plugin->file);
   }
   Dmsg1(dbglvl, "num plugins=%d\n", b_plugin_list->size());
   dbg_plugin_add_hook(dump_dir_plugin);
}
void load_dir_plugins ( const char * plugin_dir ) { Plugin * plugin ; int i ; Dmsg0 ( dbglvl , " \n " ) ; if ( ! plugin_dir ) { Dmsg0 ( dbglvl , " \n " ) ; return ; } b_plugin_list = New ( alist ( 10 , not_owned_by_alist ) ) ; if ( ! load_plugins ( ( void * ) & binfo , ( void * ) & bfuncs , plugin_dir , plugin_type , is_plugin_compatible ) ) { if ( b_plugin_list -> size ( ) == 0 ) { delete b_plugin_list ; b_plugin_list = NULL ; Dmsg0 ( dbglvl , " \n " ) ; return ; } } foreach_alist_index ( i , plugin , b_plugin_list ) { Jmsg ( NULL , M_INFO , 0 , _ ( " \n " ) , plugin -> file ) ; Dmsg1 ( dbglvl , " \n " , plugin -> file ) ; } Dmsg1 ( dbglvl , " \n " , b_plugin_list -> size ( ) ) ; dbg_plugin_add_hook ( dump_dir_plugin ) ; }
This entry point is called internally by Bacula to ensure
  that the plugin IO calls come into this code.
This entry point is called internally by Bacula to ensure that the plugin IO calls come into this code .
/* Either none found, or some error */ /*
    * Verify that the plugin is acceptable, and print information
    *  about it.
    */