]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/parse_conf.c
06Mar05
[bacula/bacula] / bacula / src / lib / parse_conf.c
index 031f939d354233ffc02ea6c278c296e87d4abc68..d5dc130815e7ac8a8360143d43f6e1fcc918f85f 100755 (executable)
@@ -528,6 +528,32 @@ void store_alist_res(LEX *lc, RES_ITEM *item, int index, int pass)
 }
 
 
+/*
+ * Store a string in an alist.
+ */
+void store_alist_str(LEX *lc, RES_ITEM *item, int index, int pass)
+{
+   alist *list;
+
+   if (pass == 2) {
+      if (*(item->value) == NULL) {
+        list = New(alist(10, owned_by_alist));
+      } else {
+        list = (alist *)(*(item->value));    
+      }
+
+      lex_get_token(lc, T_STRING);   /* scan next item */
+      Dmsg4(900, "Append %s to alist %p size=%d %s\n", 
+        lc->str, list, list->size(), item->name);
+      list->append(bstrdup(lc->str));
+      *(item->value) = (char *)list;
+   }
+   scan_to_eol(lc);
+   set_bit(index, res_all.hdr.item_present);
+}
+
+
+
 /*
  * Store default values for Resource from xxxDefs
  * If we are in pass 2, do a lookup of the