Browse Source

ckdb - ignore checking the web Anon username for ovents - just check the IP

master
kanoi 9 years ago
parent
commit
b1ed1ee158
  1. 5
      src/ckdb.h
  2. 2
      src/ckdb_data.c

5
src/ckdb.h

@ -51,7 +51,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.4" #define DB_VERSION "1.0.4"
#define CKDB_VERSION DB_VERSION"-1.958" #define CKDB_VERSION DB_VERSION"-1.959"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__
@ -2106,6 +2106,9 @@ extern K_STORE *ovents_store;
#define OVENT_OK EVENT_OK #define OVENT_OK EVENT_OK
// Web uses this, so only check IP for this user
#define ANON_USER "Anon"
/* user limits are checked for matching id+user /* user limits are checked for matching id+user
* ip limits are checked for matching id+ip, * ip limits are checked for matching id+ip,
* however, it requires more than one user found with the given ip * however, it requires more than one user found with the given ip

2
src/ckdb_data.c

@ -5121,7 +5121,7 @@ int check_ovents(int id, char *u_key, char *i_key, char *c_key, tv_t *now)
K_WLOCK(ovents_free); K_WLOCK(ovents_free);
K_RLOCK(event_limits_free); K_RLOCK(event_limits_free);
if (u_key[0]) { if (u_key[0] && strcmp(u_key, ANON_USER) != 0) {
was = check_one_ovent(id, u_key, now, was = check_one_ovent(id, u_key, now,
o_limits[id].user_low_time, o_limits[id].user_low_time,
o_limits[id].user_low_time_limit, o_limits[id].user_low_time_limit,

Loading…
Cancel
Save