Browse Source

ckdb - payout address search must be locked

master
kanoi 9 years ago
parent
commit
d72afa7e4f
  1. 2
      src/ckdb.h
  2. 2
      src/ckdb_cmd.c

2
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__

2
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

Loading…
Cancel
Save