]> git.sur5r.net Git - bacula/bacula/commitdiff
Handle all kind of plugins when computing plugin name length
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 23 Nov 2010 22:17:20 +0000 (23:17 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Nov 2010 14:09:58 +0000 (15:09 +0100)
bacula/src/lib/plugins.c

index cd1071929e38718e3adb4b4fbf35b4d80adb0364..5003c5d450853fb0bc85e6ece539c16b9d679bde 100644 (file)
@@ -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, "-fd.") - plugin->file;
+      plugin->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"),