mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
Formatting code using astyle
This commit is contained in:
22
repmgr.c
22
repmgr.c
@@ -425,7 +425,7 @@ do_cluster_show(void)
|
|||||||
PQclear(res);
|
PQclear(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_cluster_cleanup(void)
|
do_cluster_cleanup(void)
|
||||||
{
|
{
|
||||||
int master_id;
|
int master_id;
|
||||||
@@ -1392,7 +1392,8 @@ do_standby_follow(void)
|
|||||||
{
|
{
|
||||||
master_conn = getMasterConnection(conn, repmgr_schema,
|
master_conn = getMasterConnection(conn, repmgr_schema,
|
||||||
options.cluster_name, &master_id,(char *) &master_conninfo);
|
options.cluster_name, &master_id,(char *) &master_conninfo);
|
||||||
} while (master_conn == NULL && runtime_options.wait_for_master);
|
}
|
||||||
|
while (master_conn == NULL && runtime_options.wait_for_master);
|
||||||
|
|
||||||
if (master_conn == NULL)
|
if (master_conn == NULL)
|
||||||
{
|
{
|
||||||
@@ -1776,7 +1777,7 @@ test_ssh_connection(char *host, char *remote_user)
|
|||||||
char script[MAXLEN];
|
char script[MAXLEN];
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* On some OS, true is located in a different place than in Linux */
|
/* On some OS, true is located in a different place than in Linux */
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#define TRUEBIN_PATH "/usr/bin/true"
|
#define TRUEBIN_PATH "/usr/bin/true"
|
||||||
#else
|
#else
|
||||||
@@ -2175,24 +2176,29 @@ write_primary_conninfo(char* line)
|
|||||||
|
|
||||||
/* Environment variable for password (UGLY, please use .pgpass!) */
|
/* Environment variable for password (UGLY, please use .pgpass!) */
|
||||||
const char *password = getenv("PGPASSWORD");
|
const char *password = getenv("PGPASSWORD");
|
||||||
if (password != NULL) {
|
if (password != NULL)
|
||||||
|
{
|
||||||
maxlen_snprintf(password_buf, " password=%s", password);
|
maxlen_snprintf(password_buf, " password=%s", password);
|
||||||
}
|
}
|
||||||
else if (require_password) {
|
else if (require_password)
|
||||||
|
{
|
||||||
log_err(_("%s: PGPASSWORD not set, but having one is required\n"),
|
log_err(_("%s: PGPASSWORD not set, but having one is required\n"),
|
||||||
progname);
|
progname);
|
||||||
exit(ERR_BAD_PASSWORD);
|
exit(ERR_BAD_PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runtime_options.host[0]) {
|
if (runtime_options.host[0])
|
||||||
|
{
|
||||||
maxlen_snprintf(host_buf, " host=%s", runtime_options.host);
|
maxlen_snprintf(host_buf, " host=%s", runtime_options.host);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runtime_options.username[0]) {
|
if (runtime_options.username[0])
|
||||||
|
{
|
||||||
maxlen_snprintf(user_buf, " user=%s", runtime_options.username);
|
maxlen_snprintf(user_buf, " user=%s", runtime_options.username);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.node_name[0]) {
|
if (options.node_name[0])
|
||||||
|
{
|
||||||
maxlen_snprintf(appname_buf, " application_name=%s", options.node_name);
|
maxlen_snprintf(appname_buf, " application_name=%s", options.node_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user