mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
If the user doesn't pass the port on which the primary server is listening
we have to assume it's the DEFAULT_MASTER_PORT. This was not done, so we added a check to see if it has a value that is usable, else we use DEFAULT_MASTER_PORT.
This commit is contained in:
committed by
Jaime Casanova
parent
d3c067f1bd
commit
07a216ca25
6
repmgr.c
6
repmgr.c
@@ -288,6 +288,12 @@ main(int argc, char **argv)
|
||||
strncpy(runtime_options.dbname, DEFAULT_DBNAME, MAXLEN);
|
||||
}
|
||||
|
||||
/* We check that port number is not null */
|
||||
if (!runtime_options.dbname[0])
|
||||
{
|
||||
strncpy(runtime_options.masterport, DEFAULT_MASTER_PORT, MAXLEN);
|
||||
}
|
||||
|
||||
/* Read the configuration file, normally repmgr.conf */
|
||||
if (!runtime_options.config_file[0])
|
||||
strncpy(runtime_options.config_file, DEFAULT_CONFIG_FILE, MAXLEN);
|
||||
|
||||
Reference in New Issue
Block a user