Function declaration problem

Code Source From: Self Code
Description:  【Optional】
Jira:  #【Optional】
市场项目编号(名称):【Optional】
This commit is contained in:
shenzhengntu 2023-06-14 21:35:03 +08:00
parent 9ee3bdf853
commit b1f7353e14

View File

@ -47,18 +47,9 @@ pid_t startupPid = 0;
// return true;
// }
bool ReConnectPrimaryDB(void) {
if (push_standby == true && pushconn!=NULL) {
PQfinish(pushconn);
pushconn = NULL;
if (ConnectPrimaryDB() == true) {
return true;
}
}
return false;
}
static bool ConnectPrimaryDB(void);
static bool ConnectPrimaryDB() {
static bool ConnectPrimaryDB(void) {
char *err;
char conninfo[maxconnlen];
// const char *keys[] = {"dbname","user","password","host","port",NULL};
@ -83,6 +74,18 @@ static bool ConnectPrimaryDB() {
return true;
}
bool ReConnectPrimaryDB(void) {
if (push_standby == true && pushconn!=NULL) {
PQfinish(pushconn);
pushconn = NULL;
if (ConnectPrimaryDB() == true) {
return true;
}
}
return false;
}
// static bool ConnectPrimaryDB4ReplyLSN() {
// char *err;
// char conninfo[maxconnlen];