From: Eric Bollengier Date: Wed, 24 Nov 2010 09:03:54 +0000 (+0100) Subject: rename plugin->len to plugin->file_len X-Git-Tag: Release-7.0.0~1346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=404158795c33941be45a51fd64fd276d32873907;p=bacula%2Fbacula rename plugin->len to plugin->file_len --- 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;