Skip to content

Commit

Permalink
LMDB: do not pass data variable when deleting tiles
Browse files Browse the repository at this point in the history
As MapCache LMDB uses single entry per key, there is no need to
pass data to mdb_del call.
  • Loading branch information
marisn committed Oct 12, 2023
1 parent a70c4f4 commit 6979aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cache_lmdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int _mapcache_cache_lmdb_has_tile(mapcache_context *ctx, mapcache_cache *
static void _mapcache_cache_lmdb_delete(mapcache_context *ctx, mapcache_cache *pcache, mapcache_tile *tile)
{
int rc;
MDB_val key, data;
MDB_val key;
MDB_txn *txn;
mapcache_cache_lmdb *cache = (mapcache_cache_lmdb*)pcache;
char *skey;
Expand All @@ -128,7 +128,7 @@ static void _mapcache_cache_lmdb_delete(mapcache_context *ctx, mapcache_cache *p
return;
}

rc = mdb_del(txn, lmdb_env->dbi, &key, &data);
rc = mdb_del(txn, lmdb_env->dbi, &key, NULL);
if (rc) {
if (rc == MDB_NOTFOUND) {
ctx->log(ctx,MAPCACHE_DEBUG,"attempt to delete tile %s absent in the db %s",skey,cache->basedir);
Expand Down

0 comments on commit 6979aba

Please sign in to comment.