diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-04-01 19:45:35 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-04-01 19:45:35 +0400 |
commit | 6be82def714f297d54302953286223b4afb07208 (patch) | |
tree | b156eea2e245efeb95702cc6bae6beaa02341440 /src/cfg_file.h | |
parent | a43a37453f497a919fb4a5358615d89f18706935 (diff) | |
download | rspamd-6be82def714f297d54302953286223b4afb07208.tar.gz rspamd-6be82def714f297d54302953286223b4afb07208.zip |
* Add dumper to XML file (not all sections yet)
* Add checksum to config files
* Some config parsing reorganizations:
- post_load_config should be called after xml initialization
- xml state machine is corrected to read main section variables
- some linting is added to xml (checking of elements parity)
Diffstat (limited to 'src/cfg_file.h')
-rw-r--r-- | src/cfg_file.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/cfg_file.h b/src/cfg_file.h index b4f5a0e1f..3ec7391e4 100644 --- a/src/cfg_file.h +++ b/src/cfg_file.h @@ -266,16 +266,18 @@ struct config_file { GHashTable* factors; /**< hash of factors indexed by symbol name */ GHashTable* c_modules; /**< hash of c modules indexed by module name */ GHashTable* composite_symbols; /**< hash of composite symbols indexed by its name */ - GList *classifiers; /**< list of all classifiers defined */ - GList *statfiles; /**< list of all statfiles in config file order */ - GHashTable *classifiers_symbols; /**< hashtable indexed by symbol name of classifiers */ - GHashTable* cfg_params; /**< all cfg params indexed by its name in this structure */ + GList *classifiers; /**< list of all classifiers defined */ + GList *statfiles; /**< list of all statfiles in config file order */ + GHashTable *classifiers_symbols; /**< hashtable indexed by symbol name of classifiers */ + GHashTable* cfg_params; /**< all cfg params indexed by its name in this structure */ int clock_res; /**< resolution of clock used */ double grow_factor; /**< grow factor for consolidation callback */ GList *views; /**< views */ - GHashTable* domain_settings; /**< settings per-domains */ - GHashTable* user_settings; /**< settings per-user */ - + GHashTable* domain_settings; /**< settings per-domains */ + GHashTable* user_settings; /**< settings per-user */ + + gchar* checksum; /**< real checksum of config file */ + gchar* dump_checksum; /**< dump checksum of config file */ }; /** @@ -361,6 +363,12 @@ gchar* substitute_variable (struct config_file *cfg, gchar *name, gchar *str, gu */ void post_load_config (struct config_file *cfg); +/** + * Calculate checksum for config file + * @param cfg config file + */ +gboolean get_config_checksum (struct config_file *cfg); + /** * Replace all \" with a single " in given string |