Code

patches: Removed include_empty_files.dpatch.
authorSebastian Harl <sh@tokkee.org>
Tue, 2 Jun 2009 19:08:55 +0000 (21:08 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 2 Jun 2009 19:08:55 +0000 (21:08 +0200)
This patch has been included upstream.

debian/changelog
debian/patches/00list
debian/patches/include_empty_files.dpatch [deleted file]

index 6a4327bcb3c9fa4418eb24a0bf4d25803c8d1d7d..0b8d183a295e0e31d9824e3ae7965d02cba34cad 100644 (file)
@@ -3,10 +3,11 @@ collectd (4.6.3-1) unstable; urgency=low
   * New upstream release.
   * debian/patches:
     - Removed battery_acpi_complain.dpatch - included upstream.
+    - Removed include_empty_files.dpatch - included upstream.
   * debian/rules:
     - Install collectd-network.py to /usr/share/doc/collectd/examples/.
 
- -- Sebastian Harl <tokkee@debian.org>  Tue, 02 Jun 2009 21:06:02 +0200
+ -- Sebastian Harl <tokkee@debian.org>  Tue, 02 Jun 2009 21:08:34 +0200
 
 collectd (4.6.2-3) unstable; urgency=low
 
index 14eaad54e1ad8fc44fe1280b2e07beb5ad906393..d28f1dcdbc1438241517c9ff1a2572de57ff1515 100644 (file)
@@ -1,6 +1,5 @@
 rrd_filter_path.dpatch
 collection_conf_path.dpatch
 ntpd_type_pun_fix.dpatch
-include_empty_files.dpatch
 rrdtool_uninitialized_fix.dpatch
 
diff --git a/debian/patches/include_empty_files.dpatch b/debian/patches/include_empty_files.dpatch
deleted file mode 100755 (executable)
index cf6d673..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## include_empty_files.dpatch by Sebastian Harl <sh@tokkee.org>
-##
-## DP: configfile.c: Fixed Include'ing empty files.
-## DP:
-## DP: When including empty files, a typo prevented that the "Include" child
-## DP: (of the config parse tree) was removed correctly, leaving behind
-## DP: garbage which in turn led to a segfault if the Include option was not
-## DP: the last element of the config file.
-## DP:
-## DP: Also, another Include option following the inclusion of an empty file
-## DP: used to be ignored. This has been fixed as well.
-
-@DPATCH@
-
-diff a/src/configfile.c b/src/configfile.c
---- a/src/configfile.c
-+++ b/src/configfile.c
-@@ -378,12 +378,12 @@ static int cf_ci_replace_child (oconfig_item_t *dst, oconfig_item_t *src,
-       temp = NULL;
-       /* If (src->children_num == 0) the array size is decreased. If offset
--       * is _not_ the last element, (offset < (src->children_num - 1)), then
-+       * is _not_ the last element, (offset < (dst->children_num - 1)), then
-        * we need to move the trailing elements before resizing the array. */
--      if ((src->children_num == 0) && (offset < (src->children_num - 1)))
-+      if ((src->children_num == 0) && (offset < (dst->children_num - 1)))
-       {
--              int nmemb = src->children_num - (offset + 1);
--              memmove (src->children + offset, src->children + offset + 1,
-+              int nmemb = dst->children_num - (offset + 1);
-+              memmove (dst->children + offset, dst->children + offset + 1,
-                               sizeof (oconfig_item_t) * nmemb);
-       }
-@@ -415,7 +415,7 @@ static int cf_ci_replace_child (oconfig_item_t *dst, oconfig_item_t *src,
-                               sizeof (oconfig_item_t) * nmemb);
-       }
--      /* Last but not least: If there are new childrem, copy them to the
-+      /* Last but not least: If there are new children, copy them to the
-        * memory reserved for them. */
-       if (src->children_num > 0)
-       {
-@@ -491,6 +491,9 @@ static int cf_include_all (oconfig_item_t *root, int depth)
-               /* Now replace the i'th child in `root' with `new'. */
-               cf_ci_replace_child (root, new, i);
-+              /* ... and go back to the new i'th child. */
-+              --i;
-+
-               sfree (new->values);
-               sfree (new);
-       } /* for (i = 0; i < root->children_num; i++) */