diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-08-20 18:12:37 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2024-08-20 18:12:37 +0000 |
| commit | 45c04a53fb9fbefe4dd86514c7563b4af1961dfb (patch) | |
| tree | 4e90eed434b9292e405245d5394e9a9f3e3a3c46 /src/libdcache/dcache_search.c | |
| parent | 1360696c2d6ed7083a71979c8382c9d34df12cf0 (diff) | |
| download | shibari-45c04a53fb9fbefe4dd86514c7563b4af1961dfb.tar.gz | |
Add a lot of stuff, disable shibari-cache build for now
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libdcache/dcache_search.c')
| -rw-r--r-- | src/libdcache/dcache_search.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/libdcache/dcache_search.c b/src/libdcache/dcache_search.c deleted file mode 100644 index 3d79dd6..0000000 --- a/src/libdcache/dcache_search.c +++ /dev/null @@ -1,24 +0,0 @@ -/* ISC license. */ - -#include <stdint.h> - -#include <skalibs/avltree.h> - -#include <shibari/dcache.h> -#include "dcache-internal.h" - -dcache_node_t *dcache_search (dcache_t *z, char const *key, uint16_t keylen, tain const *stamp) -{ - uint32_t i ; - dcache_key_t k = { .s = (char *)key, .len = keylen } ; - if (avltree_search(&z->by_key, &k, &i)) - { - if (tain_less(&DNODE(z, i)->expire, stamp)) - { - dcache_clean_expired(z, stamp) ; - if (!avltree_search(&z->by_key, &k, &i)) return 0 ; - } - return DNODE(z, i) ; - } - else return 0 ; -} |
