Improve configuration file handling

Put logic in config.c so it can be shared between repmgr and repmgrd.
This commit is contained in:
Ian Barwick
2015-03-03 15:39:56 +09:00
parent 6b1f55ff1b
commit 46888de77f
4 changed files with 67 additions and 41 deletions

View File

@@ -67,9 +67,9 @@ typedef struct
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", "", 0, 0, 0, {NULL, NULL} }
bool parse_config(const char *config_file, t_configuration_options * options);
bool parse_config(const char *config_file, t_configuration_options *options);
void parse_line(char *buff, char *name, char *value);
char *trim(char *s);
bool reload_config(char *config_file, t_configuration_options * orig_options);
bool reload_config(char *config_file, t_configuration_options *orig_options);
#endif