bpContext *plugin_ctx;
bsdEvent event;
Plugin *plugin;
- int i = 0;
+ int i;
bRC rc = bRC_OK;
- if (!bplugin_list || !jcr || !jcr->plugin_ctx_list) {
+ if (!bplugin_list) {
+ Dmsg0(dbglvl, "No bplugin_list: generate_plugin_event ignored.\n");
+ return bRC_OK;
+ }
+ if (!jcr) {
+ Dmsg0(dbglvl, "No jcr: generate_plugin_event ignored.\n");
+ return bRC_OK;
+ }
+ if (!jcr->plugin_ctx_list) {
+ Dmsg0(dbglvl, "No plugin_ctx_list: generate_plugin_event ignored.\n");
return bRC_OK; /* Return if no plugins loaded */
}
if (jcr->is_job_canceled()) {
+ Dmsg0(dbglvl, "Cancel return from generate_plugin_event\n");
return bRC_Cancel;
}
void new_plugins(JCR *jcr)
{
Plugin *plugin;
- int i = 0;
+ int i;
Dmsg0(dbglvl, "=== enter new_plugins ===\n");
if (!bplugin_list) {
if (jcr->is_job_canceled()) {
return;
}
+ /*
+ * If plugins already loaded, just return
+ */
+ if (jcr->plugin_ctx_list) {
+ return;
+ }
int num = bplugin_list->size();
void free_plugins(JCR *jcr)
{
Plugin *plugin;
- int i = 0;
+ int i;
if (!bplugin_list || !jcr->plugin_ctx_list) {
return;