|
|
@ -503,16 +503,16 @@ bool _CKPQConn(PGconn **conn, WHERE_FFL_ARGS) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (*conn == NULL) { |
|
|
|
if (*conn == NULL) { |
|
|
|
if (connect_dis == false) { |
|
|
|
if (connect_dis == false) { |
|
|
|
LOGEMERG("%s() ERR already (%s/%s/%d)" WHERE_FFL |
|
|
|
LOGNOTICE("%s() already (%s/%s/%d)" WHERE_FFL |
|
|
|
#if LOCK_CHECK |
|
|
|
#if LOCK_CHECK |
|
|
|
" @%s" |
|
|
|
" @%s" |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
, __func__, connect_file, connect_func, |
|
|
|
, __func__, connect_file, connect_func, |
|
|
|
connect_line, WHERE_FFL_PASS |
|
|
|
connect_line, WHERE_FFL_PASS |
|
|
|
#if LOCK_CHECK |
|
|
|
#if LOCK_CHECK |
|
|
|
, my_thread_name |
|
|
|
, my_thread_name |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!pgdb_paused) { |
|
|
|
if (!pgdb_paused) { |
|
|
|
LOGDEBUG("%s(): connecting", __func__); |
|
|
|
LOGDEBUG("%s(): connecting", __func__); |
|
|
@ -607,7 +607,7 @@ int64_t nextid(PGconn *conn, char *idname, int64_t increment, |
|
|
|
char *params[5]; |
|
|
|
char *params[5]; |
|
|
|
int n, f, par = 0; |
|
|
|
int n, f, par = 0; |
|
|
|
int64_t lastid; |
|
|
|
int64_t lastid; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
|
|
|
|
|
|
|
|
|
lastid = 0; |
|
|
|
lastid = 0; |
|
|
@ -1119,7 +1119,7 @@ bool users_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
USERS *row; |
|
|
|
USERS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 10; |
|
|
|
int fields = 10; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -1517,7 +1517,7 @@ bool useratts_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
USERATTS *row; |
|
|
|
USERATTS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 9; |
|
|
|
int fields = 9; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -1926,7 +1926,7 @@ bool workers_fill(PGconn *conn) |
|
|
|
K_ITEM *item = NULL; |
|
|
|
K_ITEM *item = NULL; |
|
|
|
int n, t, i; |
|
|
|
int n, t, i; |
|
|
|
WORKERS *row; |
|
|
|
WORKERS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 7; |
|
|
|
int fields = 7; |
|
|
|
bool ok = false; |
|
|
|
bool ok = false; |
|
|
@ -2324,7 +2324,7 @@ bool paymentaddresses_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
PAYMENTADDRESSES *row; |
|
|
|
PAYMENTADDRESSES *row; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 5; |
|
|
|
int fields = 5; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -2574,7 +2574,7 @@ bool payments_fill(PGconn *conn) |
|
|
|
K_ITEM *item = NULL; |
|
|
|
K_ITEM *item = NULL; |
|
|
|
PAYMENTS *row; |
|
|
|
PAYMENTS *row; |
|
|
|
int n, t, i; |
|
|
|
int n, t, i; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 11; |
|
|
|
int fields = 11; |
|
|
|
bool ok = false; |
|
|
|
bool ok = false; |
|
|
@ -2815,7 +2815,7 @@ bool idcontrol_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
IDCONTROL *row; |
|
|
|
IDCONTROL *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 2; |
|
|
|
int fields = 2; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -3381,7 +3381,7 @@ bool optioncontrol_fill(PGconn *conn) |
|
|
|
IPS *ips; |
|
|
|
IPS *ips; |
|
|
|
char *params[1]; |
|
|
|
char *params[1]; |
|
|
|
int n, i, par = 0, ban_count, ok_count; |
|
|
|
int n, i, par = 0, ban_count, ok_count; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 4; |
|
|
|
int fields = 4; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -3658,7 +3658,7 @@ bool workinfo_fill(PGconn *conn) |
|
|
|
WORKINFO *row; |
|
|
|
WORKINFO *row; |
|
|
|
char *params[3]; |
|
|
|
char *params[3]; |
|
|
|
int n, t, i, par = 0; |
|
|
|
int n, t, i, par = 0; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
size_t len, off; |
|
|
|
size_t len, off; |
|
|
|
int fields = 10; |
|
|
|
int fields = 10; |
|
|
@ -4418,7 +4418,7 @@ bool shares_fill(PGconn *conn) |
|
|
|
WORKINFO *workinfo = NULL; |
|
|
|
WORKINFO *workinfo = NULL; |
|
|
|
SHARES *row; |
|
|
|
SHARES *row; |
|
|
|
int n, t, i; |
|
|
|
int n, t, i; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
char *params[1]; |
|
|
|
char *params[1]; |
|
|
|
int fields = 16, par = 0; |
|
|
|
int fields = 16, par = 0; |
|
|
@ -6706,7 +6706,7 @@ bool blocks_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
BLOCKS *row; |
|
|
|
BLOCKS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 18; |
|
|
|
int fields = 18; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -7043,7 +7043,7 @@ bool miningpayouts_fill(PGconn *conn) |
|
|
|
K_ITEM *item = NULL; |
|
|
|
K_ITEM *item = NULL; |
|
|
|
MININGPAYOUTS *row; |
|
|
|
MININGPAYOUTS *row; |
|
|
|
int n, t, i; |
|
|
|
int n, t, i; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 4; |
|
|
|
int fields = 4; |
|
|
|
bool ok = false; |
|
|
|
bool ok = false; |
|
|
@ -7594,7 +7594,7 @@ bool payouts_fill(PGconn *conn) |
|
|
|
PAYOUTS *row; |
|
|
|
PAYOUTS *row; |
|
|
|
BLOCKS *blocks; |
|
|
|
BLOCKS *blocks; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 13; |
|
|
|
int fields = 13; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -8331,7 +8331,7 @@ bool poolstats_fill(PGconn *conn) |
|
|
|
time_t now_t; |
|
|
|
time_t now_t; |
|
|
|
char tzinfo[16], stamp[128]; |
|
|
|
char tzinfo[16], stamp[128]; |
|
|
|
POOLSTATS *row; |
|
|
|
POOLSTATS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
char *sel = NULL; |
|
|
|
size_t len, off; |
|
|
|
size_t len, off; |
|
|
|
int fields = 8; |
|
|
|
int fields = 8; |
|
|
@ -8771,7 +8771,7 @@ bool markersummary_fill(PGconn *conn) |
|
|
|
MARKERSUMMARY *row, *p_row; |
|
|
|
MARKERSUMMARY *row, *p_row; |
|
|
|
WORKMARKERS *workmarkers; |
|
|
|
WORKMARKERS *workmarkers; |
|
|
|
char *params[1]; |
|
|
|
char *params[1]; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 20, par = 0; |
|
|
|
int fields = 20, par = 0; |
|
|
|
int64_t ms = 0, amt = 0; |
|
|
|
int64_t ms = 0, amt = 0; |
|
|
@ -9414,7 +9414,7 @@ bool workmarkers_fill(PGconn *conn) |
|
|
|
char *params[1]; |
|
|
|
char *params[1]; |
|
|
|
int n, i, par = 0; |
|
|
|
int n, i, par = 0; |
|
|
|
WORKMARKERS *row; |
|
|
|
WORKMARKERS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 6; |
|
|
|
int fields = 6; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -9746,7 +9746,7 @@ bool marks_fill(PGconn *conn) |
|
|
|
K_ITEM *item; |
|
|
|
K_ITEM *item; |
|
|
|
int n, i; |
|
|
|
int n, i; |
|
|
|
MARKS *row; |
|
|
|
MARKS *row; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
int fields = 6; |
|
|
|
int fields = 6; |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
@ -9864,7 +9864,7 @@ bool check_db_version(PGconn *conn) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ExecStatusType rescode; |
|
|
|
ExecStatusType rescode; |
|
|
|
PGresult *res; |
|
|
|
PGresult *res; |
|
|
|
char *field; |
|
|
|
char *field = NULL; |
|
|
|
char *sel; |
|
|
|
char *sel; |
|
|
|
char *pgv; |
|
|
|
char *pgv; |
|
|
|
int fields = 3; |
|
|
|
int fields = 3; |
|
|
|