MEDIUM: cfgparse: post section callback
This commit implements a post section callback. This callback will be
used at the end of a section parsing.
Every call to cfg_register_section must be modified to use the new
prototype:
int cfg_register_section(char *section_name,
int (*section_parser)(const char *, int, char **, int),
int (*post_section_parser)());
diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h
index fd04b14..fc96bfe 100644
--- a/include/common/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -73,7 +73,8 @@
int check_config_validity();
int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf, const char *file, int line, char **err);
int cfg_register_section(char *section_name,
- int (*section_parser)(const char *, int, char **, int));
+ int (*section_parser)(const char *, int, char **, int),
+ int (*post_section_parser)());
void cfg_unregister_sections(void);
void cfg_backup_sections(struct list *backup_sections);
void cfg_restore_sections(struct list *backup_sections);