From 997b729e8cbd05f51bac7dcd795ca7b35aa5e551 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 12 Dec 2012 21:44:22 +0000 Subject: adding function to compute configuration differences in memory --- src/include/gnunet_configuration_lib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/include/gnunet_configuration_lib.h') diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 77d6d5552..0c87a537d 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h @@ -154,6 +154,7 @@ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename); + /** * Write only configuration entries that have been changed to configuration file * @param cfgDefault default configuration @@ -167,6 +168,21 @@ GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle const struct GNUNET_CONFIGURATION_Handle *cfgNew, const char *filename); + +/** + * Compute configuration with only entries that have been changed + * + * @param cfgDefault original configuration + * @param cfgNew new configuration + * @return configuration with only the differences, never NULL + */ +struct GNUNET_CONFIGURATION_Handle * +GNUNET_CONFIGURATION_get_diff (const struct GNUNET_CONFIGURATION_Handle + *cfgDefault, + const struct GNUNET_CONFIGURATION_Handle + *cfgNew); + + /** * Test if there are configuration options that were * changed since the last save. -- cgit v1.2.3