From d72afa7e4f0a2f40ea9eb5e54dd699e8acddf619 Mon Sep 17 00:00:00 2001 From: kanoi Date: Tue, 8 Dec 2015 22:00:47 +1100 Subject: [PATCH] ckdb - payout address search must be locked --- src/ckdb.h | 2 +- src/ckdb_cmd.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ckdb.h b/src/ckdb.h index ceabfde1..f866fcc5 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -55,7 +55,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.4" -#define CKDB_VERSION DB_VERSION"-1.602" +#define CKDB_VERSION DB_VERSION"-1.603" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__ diff --git a/src/ckdb_cmd.c b/src/ckdb_cmd.c index b91542da..bab3f32a 100644 --- a/src/ckdb_cmd.c +++ b/src/ckdb_cmd.c @@ -667,7 +667,9 @@ static char *cmd_userset(PGconn *conn, char *cmd, char *id, while (pa_item) { DATA_PAYMENTADDRESSES(row, pa_item); // Only EVER validate addresses once ... for now + K_RLOCK(paymentaddresses_free); old_pa_item = find_any_payaddress(row->payaddress); + K_RUNLOCK(paymentaddresses_free); if (old_pa_item) { /* This test effectively means that * two users can never add the same