]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/parse_conf.c
Pool + label cleanups from bug reports
[bacula/bacula] / bacula / src / lib / parse_conf.c
index d29697d4b4584857e606df9629bb3a5e21194fef..1e64fb2765824a8b72afc0a44db2563bc76b3edc 100755 (executable)
@@ -442,6 +442,10 @@ void store_res(LEX *lc, RES_ITEM *item, int index, int pass)
         scan_err3(lc, _("Could not find config Resource %s referenced on line %d : %s\n"), 
           lc->str, lc->line_no, lc->line);
      }
+     if (*(item->value)) {
+        scan_err3(lc, _("Attempt to redefine resource \"%s\" referenced on line %d : %s\n"), 
+          lc->str, lc->line_no, lc->line);
+     }
      *(item->value) = (char *)res;
    }
    scan_to_eol(lc);
@@ -837,3 +841,11 @@ RES **save_config_resources()
    }
    return res;
 }
+
+RES **new_res_head()
+{
+   int size = (r_last - r_first + 1) * sizeof(RES *);
+   RES **res = (RES **)malloc(size);
+   memset(res, 0, size);
+   return res;
+}