Browse Source

ckdb - correct lock type in cmd_setopts

master
kanoi 9 years ago
parent
commit
51b892440b
  1. 2
      src/ckdb.h
  2. 4
      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.703"
#define CKDB_VERSION DB_VERSION"-1.704"
#define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__

4
src/ckdb_cmd.c

@ -3959,9 +3959,9 @@ static char *cmd_setopts(PGconn *conn, char *cmd, char *id,
}
}
if (!oc_item) {
K_RLOCK(optioncontrol_free);
K_WLOCK(optioncontrol_free);
oc_item = k_unlink_head(optioncontrol_free);
K_RUNLOCK(optioncontrol_free);
K_WUNLOCK(optioncontrol_free);
DATA_OPTIONCONTROL(optioncontrol, oc_item);
bzero(optioncontrol, sizeof(*optioncontrol));
STRNCPY(optioncontrol->optionname, optionname);

Loading…
Cancel
Save