/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
static bRC baculaSetValue(bpContext *ctx, bwVariable var, void *value);
static bRC baculaRegisterEvents(bpContext *ctx, ...);
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg);
+ int type, utime_t mtime, const char *msg);
static bRC baculaDebugMsg(bpContext *ctx, const char *file, int line,
int level, const char *msg);
}
plugin_list = New(alist(10, not_owned_by_alist));
- load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type);
+ load_plugins((void *)&binfo, (void *)&bfuncs, plugin_dir, plugin_type, NULL);
dbg_plugin_add_hook(dump_dir_plugin);
}
Dmsg2(dbglvl, "Free instance plugin_ctx_list=%p JobId=%d\n", jcr->plugin_ctx_list, jcr->JobId);
foreach_alist(plugin, plugin_list) {
/* Free the plugin instance */
- plug_func(plugin)->freePlugin(&plugin_ctx_list[i++]);
+ plug_func(plugin)->freePlugin(&plugin_ctx_list[i]);
+ plugin_ctx_list[i].bContext = NULL;
+ plugin_ctx_list[i].pContext = NULL;
+ i++;
}
free(plugin_ctx_list);
jcr->plugin_ctx_list = NULL;
}
static bRC baculaJobMsg(bpContext *ctx, const char *file, int line,
- int type, time_t mtime, const char *msg)
+ int type, utime_t mtime, const char *msg)
{
- Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%ld msg=%s\n",
+ Dmsg5(dbglvl, "Job message: %s:%d type=%d time=%lld msg=%s\n",
file, line, type, mtime, msg);
return bRC_OK;
}