From: Eric Bollengier Date: Tue, 18 Nov 2008 11:01:18 +0000 (+0000) Subject: ebl Add debug hook X-Git-Tag: Release-7.0.0~3724 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a156d361720c1f2c0f097bdafacf3361899253ae;p=bacula%2Fbacula ebl Add debug hook git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8053 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/sd_plugins.c b/bacula/src/stored/sd_plugins.c index 6c0d6dc571..ef0b8fde79 100644 --- a/bacula/src/stored/sd_plugins.c +++ b/bacula/src/stored/sd_plugins.c @@ -95,6 +95,21 @@ void generate_plugin_event(JCR *jcr, bEventType eventType, void *value) return; } +static void dump_sd_plugin(Plugin *plugin, FILE *fp) +{ + if (!plugin) { + return ; + } + pInfo *info = (pInfo *) plugin->pinfo; + fprintf(fp, "\tversion=%d\n", info->version); + fprintf(fp, "\tdate=%s\n", NPRTB(info->plugin_date)); + fprintf(fp, "\tmagic=%s\n", NPRTB(info->plugin_magic)); + fprintf(fp, "\tauthor=%s\n", NPRTB(info->plugin_author)); + fprintf(fp, "\tlicence=%s\n", NPRTB(info->plugin_license)); + fprintf(fp, "\tversion=%s\n", NPRTB(info->plugin_version)); + fprintf(fp, "\tdescription=%s\n", NPRTB(info->plugin_description)); +} + void load_dir_plugins(const char *plugin_dir) { if (!plugin_dir) { @@ -103,6 +118,7 @@ void load_dir_plugins(const char *plugin_dir) plugin_list = New(alist(10, not_owned_by_alist)); load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type); + dbg_plugin_add_hook(dump_sd_plugin); } /*