Plugin *plugin;
int i = 0;
- if (!plugin_list || !jcr || !jcr->plugin_ctx_list) {
+ if (!bplugin_list || !jcr || !jcr->plugin_ctx_list) {
return;
}
Dmsg2(dbglvl, "plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
bRC rc;
rc = plug_func(plugin)->handlePluginEvent(&plugin_ctx_list[i++], &event, value);
if (rc != bRC_OK) {
return;
}
- plugin_list = New(alist(10, not_owned_by_alist));
+ bplugin_list = New(alist(10, not_owned_by_alist));
load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type, NULL);
dbg_plugin_add_hook(dump_dir_plugin);
}
Plugin *plugin;
int i = 0;
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
- int num = plugin_list->size();
+ int num = bplugin_list->size();
if (num == 0) {
return;
bpContext *plugin_ctx_list = jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Instantiate plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Start a new instance of each plugin */
plugin_ctx_list[i].bContext = (void *)jcr;
plugin_ctx_list[i].pContext = NULL;
Plugin *plugin;
int i = 0;
- if (!plugin_list || !jcr->plugin_ctx_list) {
+ if (!bplugin_list || !jcr->plugin_ctx_list) {
return;
}
bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Free instance plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Free the plugin instance */
plug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
plugin_ctx_list[i].bContext = NULL;
edit_uint64_with_commas(sm_max_buffers, b5));
/* TODO: use this function once for all daemons */
- if (debug_level > 0 && plugin_list->size() > 0) {
+ if (debug_level > 0 && bplugin_list->size() > 0) {
int len;
Plugin *plugin;
POOL_MEM msg(PM_FNAME);
pm_strcpy(msg, " Plugin: ");
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
len = pm_strcat(msg, plugin->file);
if (len > 80) {
pm_strcat(msg, "\n ");
bool call_if_canceled = false;
bRC rc;
- if (!plugin_list || !jcr || !jcr->plugin_ctx_list) {
+ if (!bplugin_list || !jcr || !jcr->plugin_ctx_list) {
return; /* Return if no plugins loaded */
}
* Pass event to every plugin (except if name is set). If name
* is set, we pass it only to the plugin with that name.
*/
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
if (name && !for_this_plug(plugin, name, len)) {
i++;
continue;
int rc = bRC_OK;
int i = 0;
- if (!plugin_list || !jcr || !jcr->plugin_ctx_list || jcr->is_job_canceled()) {
+ if (!bplugin_list || !jcr || !jcr->plugin_ctx_list || jcr->is_job_canceled()) {
return false; /* Return if no plugins loaded */
}
Dmsg2(dbglvl, "plugin_ctx=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
/* Pass event to every plugin */
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
jcr->plugin_ctx = &plugin_ctx_list[i++];
jcr->plugin = plugin;
if (is_plugin_disabled(jcr)) {
POOL_MEM fname(PM_FNAME);
POOL_MEM link(PM_FNAME);
- if (!plugin_list || !jcr->plugin_ctx_list || jcr->is_job_canceled()) {
+ if (!bplugin_list || !jcr->plugin_ctx_list || jcr->is_job_canceled()) {
Jmsg1(jcr, M_FATAL, 0, "Command plugin \"%s\" requested, but is not loaded.\n", cmd);
return 1; /* Return if no plugins loaded */
}
}
/* Note, we stop the loop on the first plugin that matches the name */
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
Dmsg4(dbglvl, "plugin=%s plen=%d cmd=%s len=%d\n", plugin->file, plugin->file_len, cmd, len);
if (!for_this_plug(plugin, cmd, len)) {
i++;
/*
* Search for correct plugin as specified on the command
*/
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
bEvent event;
Dmsg3(dbglvl, "plugin=%s cmd=%s len=%d\n", plugin->file, cmd, len);
if (!for_this_plug(plugin, cmd, len)) {
return;
}
- plugin_list = New(alist(10, not_owned_by_alist));
+ bplugin_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 (plugin_list->size() == 0) {
- delete plugin_list;
- plugin_list = NULL;
+ if (bplugin_list->size() == 0) {
+ delete bplugin_list;
+ bplugin_list = NULL;
Dmsg0(dbglvl, "No plugins loaded\n");
return;
}
* Verify that the plugin is acceptable, and print information
* about it.
*/
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
Jmsg(NULL, M_INFO, 0, _("Loaded plugin: %s\n"), plugin->file);
Dmsg1(dbglvl, "Loaded plugin: %s\n", plugin->file);
}
/**
* Create a new instance of each plugin for this Job
- * Note, plugin_list can exist but jcr->plugin_ctx_list can
+ * Note, bplugin_list can exist but jcr->plugin_ctx_list can
* be NULL if no plugins were loaded.
*/
void new_plugins(JCR *jcr)
Plugin *plugin;
int i = 0;
- if (!plugin_list) {
+ if (!bplugin_list) {
Dmsg0(dbglvl, "plugin list is NULL\n");
return;
}
return;
}
- int num = plugin_list->size();
+ int num = bplugin_list->size();
if (num == 0) {
Dmsg0(dbglvl, "No plugins loaded\n");
bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Instantiate plugin_ctx=%p JobId=%d\n", plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Start a new instance of each plugin */
bacula_ctx *b_ctx = (bacula_ctx *)malloc(sizeof(bacula_ctx));
memset(b_ctx, 0, sizeof(bacula_ctx));
Plugin *plugin;
int i = 0;
- if (!plugin_list || !jcr->plugin_ctx_list) {
+ if (!bplugin_list || !jcr->plugin_ctx_list) {
return; /* no plugins, nothing to do */
}
bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Free instance plugin_ctx=%p JobId=%d\n", plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Free the plugin instance */
plug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
free(plugin_ctx_list[i++].bContext); /* free Bacula private context */
len = Mmsg(msg, _(" Sizeof: boffset_t=%d size_t=%d debug=%d trace=%d\n"),
sizeof(boffset_t), sizeof(size_t), debug_level, get_trace());
sendit(msg.c_str(), len, sp);
- if (debug_level > 0 && plugin_list->size() > 0) {
+ if (debug_level > 0 && bplugin_list->size() > 0) {
Plugin *plugin;
int len;
pm_strcpy(msg, "Plugin: ");
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
len = pm_strcat(msg, plugin->file);
if (len > 80) {
pm_strcat(msg, "\n ");
static const int dbglvl = 50;
/* All loaded plugins */
-alist *plugin_list = NULL;
+alist *bplugin_list = NULL;
/*
* Create a new plugin "class" entry and enter it in the
}
found = true; /* found a plugin */
- plugin_list->append(plugin);
+ bplugin_list->append(plugin);
}
get_out:
{
Plugin *plugin;
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Shut it down and unload it */
plugin->unloadPlugin();
dlclose(plugin->pHandle);
}
free(plugin);
}
- delete plugin_list;
- plugin_list = NULL;
+ delete bplugin_list;
+ bplugin_list = NULL;
}
/*
Plugin *plugin;
fprintf(fp, "Attempt to dump plugins. Hook count=%d\n", dbg_plugin_hook_count);
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
for(int i=0; i < dbg_plugin_hook_count; i++) {
// dbg_plugin_hook_t *fct = dbg_plugin_hooks[i];
fprintf(fp, "Plugin %p name=\"%s\" disabled=%d\n",
****************************************************************************/
#ifndef BUILD_PLUGIN
-extern DLL_IMP_EXP alist *plugin_list;
+extern DLL_IMP_EXP alist *bplugin_list;
#endif
/* Universal return codes from all plugin functions */
bEvent event;
Plugin *plugin;
- plugin_list = New(alist(10, not_owned_by_alist));
+ bplugin_list = New(alist(10, not_owned_by_alist));
ctx.bContext = NULL;
ctx.pContext = NULL;
load_plugins((void *)&bfuncs, plugin_dir, plugin_type);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
printf("bacula: plugin_size=%d plugin_version=%d\n",
pref(plugin)->size, pref(plugin)->interface);
printf("License: %s\nAuthor: %s\nDate: %s\nVersion: %s\nDescription: %s\n",
Plugin *plugin;
int i = 0;
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
Dmsg2(dbglvl, "plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
bRC rc;
rc = plug_func(plugin)->handlePluginEvent(&plugin_ctx_list[i++], &event, value);
if (rc != bRC_OK) {
return;
}
- plugin_list = New(alist(10, not_owned_by_alist));
+ bplugin_list = New(alist(10, not_owned_by_alist));
load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type, NULL);
dbg_plugin_add_hook(dump_sd_plugin);
}
Plugin *plugin;
int i = 0;
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
- int num = plugin_list->size();
+ int num = bplugin_list->size();
if (num == 0) {
return;
bpContext *plugin_ctx_list = jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Instantiate plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Start a new instance of each plugin */
plugin_ctx_list[i].bContext = (void *)jcr;
plugin_ctx_list[i].pContext = NULL;
Plugin *plugin;
int i = 0;
- if (!plugin_list) {
+ if (!bplugin_list) {
return;
}
bpContext *plugin_ctx_list = (bpContext *)jcr->plugin_ctx_list;
Dmsg2(dbglvl, "Free instance plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
- foreach_alist(plugin, plugin_list) {
+ foreach_alist(plugin, bplugin_list) {
/* Free the plugin instance */
plug_func(plugin)->freePlugin(&plugin_ctx_list[i++]);
}
;_Z11close_wpipeP5BPIPE
;console_command DATA
-;plugin_list DATA
+;bplugin_list DATA
;plugin_bopen DATA
;plugin_bclose DATA
;plugin_bwrite DATA
;_Z11close_wpipeP5BPIPE
;console_command DATA
-;plugin_list DATA
+;bplugin_list DATA
;plugin_bopen DATA
;plugin_bclose DATA
;plugin_bwrite DATA
;_Z17lmgr_cleanup_mainv
console_command DATA
-plugin_list DATA
+bplugin_list DATA
plugin_bopen DATA
plugin_bclose DATA
plugin_bwrite DATA
_Z6lmgr_vPP16pthread_mutex_t_
console_command DATA
-plugin_list DATA
+bplugin_list DATA
plugin_bopen DATA
plugin_bclose DATA
plugin_bwrite DATA
DATA="\
console_command \
- plugin_list"
+ bplugin_list"
for i in ${DATA}; do \
echo "$i DATA"; \
DATA="\
console_command \
- plugin_list"
+ bplugin_list"
for i in ${DATA}; do \
echo "$i DATA"; \