use struct for config file information

This commit is contained in:
trbs
2011-01-07 01:36:46 +01:00
committed by Greg Smith
parent e4f431c355
commit 814863edf2
5 changed files with 92 additions and 114 deletions

View File

@@ -17,6 +17,13 @@
*
*/
void parse_config(const char *config_file, char *cluster_name, int *node, char *service);
typedef struct
{
char cluster_name[MAXLEN];
int node;
char conninfo[MAXLEN];
} repmgr_config;
void parse_config(const char *config_file, repmgr_config *config);
void parse_line(char *buff, char *name, char *value);
char *trim(char *s);