]> git.sur5r.net Git - bacula/bacula/commitdiff
Ensure that two plugins starting with the same name won't share events
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 23 Nov 2010 18:00:44 +0000 (19:00 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 25 Nov 2010 14:06:48 +0000 (15:06 +0100)
bacula/src/filed/fd_plugins.c

index 181a4158218d003ca6f6fb5422a0c428ae4eeb1c..d57faacf661aed3dc5310acf0363ba3457365cf8 100644 (file)
@@ -538,7 +538,7 @@ bool plugin_name_stream(JCR *jcr, char *name)
    foreach_alist(plugin, plugin_list) {
       bEvent event;
       Dmsg3(dbglvl, "plugin=%s cmd=%s len=%d\n", plugin->file, cmd, len);
-      if (strncmp(plugin->file, cmd, len) != 0) {
+      if ((plugin->len != len) || (strncmp(plugin->file, cmd, len) != 0)) {
          i++;
          continue;
       }