Skip to content

Commit

Permalink
remove validation_key
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 13, 2023
1 parent d34470b commit 55f4595
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ngx_lua_resty_lmdb_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,6 @@ ngx_lua_resty_lmdb_write_tag(ngx_cycle_t *cycle,
MDB_val value;
MDB_txn *txn = NULL;

ngx_str_t validation_key =
ngx_string(NGX_LUA_RESTY_LMDB_VALIDATION_KEY);

ngx_lua_resty_lmdb_assert(lcf->validation_tag.data);

rc = mdb_txn_begin(lcf->env, NULL, 0, &txn);
Expand All @@ -486,8 +483,8 @@ ngx_lua_resty_lmdb_write_tag(ngx_cycle_t *cycle,

/* set tag value to lmdb db */

key.mv_size = validation_key.len;
key.mv_data = validation_key.data;
key.mv_size = sizeof(NGX_LUA_RESTY_LMDB_VALIDATION_KEY) - 1;
key.mv_data = NGX_LUA_RESTY_LMDB_VALIDATION_KEY;

value.mv_size = lcf->validation_tag.len;
value.mv_data = lcf->validation_tag.data;
Expand Down

0 comments on commit 55f4595

Please sign in to comment.