From 404158795c33941be45a51fd64fd276d32873907 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 24 Nov 2010 10:03:54 +0100 Subject: [PATCH] rename plugin->len to plugin->file_len --- bacula/src/filed/fd_plugins.c | 4 ++-- bacula/src/lib/plugins.c | 2 +- bacula/src/lib/plugins.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bacula/src/filed/fd_plugins.c b/bacula/src/filed/fd_plugins.c index e02f023f80..6d3ef3c7f5 100644 --- a/bacula/src/filed/fd_plugins.c +++ b/bacula/src/filed/fd_plugins.c @@ -87,7 +87,7 @@ static ssize_t my_plugin_bread(BFILE *bfd, void *buf, size_t count); static ssize_t my_plugin_bwrite(BFILE *bfd, void *buf, size_t count); static boffset_t my_plugin_blseek(BFILE *bfd, boffset_t offset, int whence); -#define for_this_plug(plugin, str, len) (((len) == (plugin)->len) && strncmp((plugin)->file, str, len) == 0) +#define for_this_plug(plugin, str, len) (((len) == (plugin)->file_len) && strncmp((plugin)->file, str, len) == 0) /* Bacula info */ static bInfo binfo = { @@ -328,7 +328,7 @@ int plugin_save(JCR *jcr, FF_PKT *ff_pkt, bool top_level) /* Note, we stop the loop on the first plugin that matches the name */ foreach_alist(plugin, plugin_list) { - Dmsg4(0, "plugin=%s plen=%d cmd=%s len=%d\n", plugin->file, plugin->len, cmd, len); + Dmsg4(0, "plugin=%s plen=%d cmd=%s len=%d\n", plugin->file, plugin->file_len, cmd, len); if (!for_this_plug(plugin, cmd, len)) { i++; continue; diff --git a/bacula/src/lib/plugins.c b/bacula/src/lib/plugins.c index 5003c5d450..35a0abf367 100644 --- a/bacula/src/lib/plugins.c +++ b/bacula/src/lib/plugins.c @@ -155,7 +155,7 @@ bool load_plugins(void *binfo, void *bfuncs, const char *plugin_dir, plugin = new_plugin(); plugin->file = bstrdup(result->d_name); - plugin->len = strstr(plugin->file, type) - plugin->file; + plugin->file_len = strstr(plugin->file, type) - plugin->file; plugin->pHandle = dlopen(fname.c_str(), RTLD_NOW); if (!plugin->pHandle) { Jmsg(NULL, M_ERROR, 0, _("Plugin load %s failed: ERR=%s\n"), diff --git a/bacula/src/lib/plugins.h b/bacula/src/lib/plugins.h index 7c10a1f99e..c3d015357b 100644 --- a/bacula/src/lib/plugins.h +++ b/bacula/src/lib/plugins.h @@ -71,7 +71,7 @@ typedef bRC (*t_unloadPlugin)(void); class Plugin { public: char *file; - int32_t len; + int32_t file_len; t_unloadPlugin unloadPlugin; void *pinfo; void *pfuncs; -- 2.39.5